Compare commits
87 Commits
nightly-v2
...
pierremtb/
Author | SHA1 | Date | |
---|---|---|---|
9407162543 | |||
067b83b468 | |||
ff2103d493 | |||
2dfa8f2176 | |||
29ed330326 | |||
c5b30341eb | |||
ca2cc825a6 | |||
3e6441b563 | |||
acafcf2d4d | |||
83fe1b7ce0 | |||
b9f31d94d5 | |||
9e03b58ae5 | |||
c591f73c70 | |||
9330aaba13 | |||
5a14f0189e | |||
9af001f22e | |||
435d1ea52e | |||
54847139f2 | |||
9369a17ea7 | |||
9ee2e7c3b0 | |||
28ae261e5f | |||
e4b0de0ead | |||
12859598a3 | |||
e9a334f433 | |||
e470a7b4af | |||
602c39f63c | |||
4994aa6f61 | |||
4aa07b81db | |||
89ef4b3243 | |||
001c9a8219 | |||
4dde3f60e0 | |||
f407c53032 | |||
9ba584487a | |||
96b66d6bca | |||
8d66f3ffad | |||
f4c54cbbe4 | |||
5156b847f3 | |||
ded9f2c56b | |||
5db5f79f9a | |||
6a883f4a8d | |||
07b91f0fb1 | |||
1b2e213afe | |||
f48a23c35e | |||
7e1d102496 | |||
94cb2535c0 | |||
9e08ec9096 | |||
17bd8ec32a | |||
d0f12e85e5 | |||
94d185944e | |||
c38b2270c3 | |||
967ad66c98 | |||
afeca9ca39 | |||
61242282f0 | |||
0065df13ce | |||
01c8d45c13 | |||
8b25527f21 | |||
2abd980de9 | |||
f783deb706 | |||
f4dd295ca1 | |||
ceaa85fe3f | |||
3991bd9173 | |||
b8f9da36c0 | |||
283315b5d2 | |||
e204dfe564 | |||
208a36196b | |||
660a349588 | |||
56c37da317 | |||
a46734b76d | |||
4347e0cf84 | |||
df3e541cdf | |||
b1cec443b9 | |||
967f49055d | |||
fe977524b5 | |||
d6f271fb0f | |||
e851b2bcc4 | |||
be569c91de | |||
5080e304b9 | |||
f4e75b7b4f | |||
31cbc90f56 | |||
a7d3552472 | |||
e984b20664 | |||
0c2cd24bda | |||
9b2de237b8 | |||
c79c02f18e | |||
4851aa2d71 | |||
76fafa6fd0 | |||
647ca11e08 |
6
.github/workflows/build-apps.yml
vendored
@ -365,7 +365,7 @@ jobs:
|
|||||||
- name: Set more complete nightly release notes
|
- name: Set more complete nightly release notes
|
||||||
if: ${{ env.IS_NIGHTLY == 'true' }}
|
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
# Note: prefered going this way instead of a full clone in the checkout step,
|
# Note: preferred going this way instead of a full clone in the checkout step,
|
||||||
# see https://github.com/actions/checkout/issues/1471
|
# see https://github.com/actions/checkout/issues/1471
|
||||||
git fetch --prune --unshallow --tags
|
git fetch --prune --unshallow --tags
|
||||||
export TAG="nightly-${VERSION}"
|
export TAG="nightly-${VERSION}"
|
||||||
@ -394,6 +394,10 @@ jobs:
|
|||||||
parent: false
|
parent: false
|
||||||
destination: 'dl.kittycad.io/releases/modeling-app/nightly'
|
destination: 'dl.kittycad.io/releases/modeling-app/nightly'
|
||||||
|
|
||||||
|
- name: Invalidate bucket cache on latest*.yml and last_download.json files
|
||||||
|
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||||
|
run: yarn files:invalidate-bucket:nightly
|
||||||
|
|
||||||
- name: Tag nightly commit
|
- name: Tag nightly commit
|
||||||
if: ${{ env.IS_NIGHTLY == 'true' }}
|
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
|
6
.github/workflows/publish-apps-release.yml
vendored
@ -126,11 +126,7 @@ jobs:
|
|||||||
destination: 'dl.kittycad.io/releases/modeling-app'
|
destination: 'dl.kittycad.io/releases/modeling-app'
|
||||||
|
|
||||||
- name: Invalidate bucket cache on latest*.yml and last_download.json files
|
- name: Invalidate bucket cache on latest*.yml and last_download.json files
|
||||||
run: |
|
run: yarn files:invalidate-bucket
|
||||||
gcloud compute url-maps invalidate-cdn-cache dl-url-map --path="/releases/modeling-app/last_download.json" --async
|
|
||||||
gcloud compute url-maps invalidate-cdn-cache dl-url-map --path="/releases/modeling-app/latest-linux-arm64.yml" --async
|
|
||||||
gcloud compute url-maps invalidate-cdn-cache dl-url-map --path="/releases/modeling-app/latest-mac.yml" --async
|
|
||||||
gcloud compute url-maps invalidate-cdn-cache dl-url-map --path="/releases/modeling-app/latest.yml" --async
|
|
||||||
|
|
||||||
- name: Upload release files to Github
|
- name: Upload release files to Github
|
||||||
if: ${{ github.event_name == 'release' }}
|
if: ${{ github.event_name == 'release' }}
|
||||||
|
43
INSTALL.md
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# Setting Up Zoo Modeling App
|
||||||
|
|
||||||
|
Compared to other CAD software, getting Zoo Modeling App up and running is quick and straightforward across platforms. It's about 100MB to download and is quick to install.
|
||||||
|
|
||||||
|
## Windows
|
||||||
|
|
||||||
|
1. Download the [Zoo Modeling App installer](https://zoo.dev/modeling-app/download) for Windows and for your processor type.
|
||||||
|
|
||||||
|
2. Once downloaded, run the installer `Zoo Modeling App-{version}-{arch}-win.exe` which should take a few seconds.
|
||||||
|
|
||||||
|
3. The installation happens at `C:\Program Files\Zoo Modeling App`. A shortcut in the start menu is also created so you can run the app easily by clicking on it.
|
||||||
|
|
||||||
|
## macOS
|
||||||
|
|
||||||
|
1. Download the [Zoo Modeling App installer](https://zoo.dev/modeling-app/download) for macOS and for your processor type.
|
||||||
|
|
||||||
|
2. Once downloaded, open the disk image `Zoo Modeling App-{version}-{arch}-mac.dmg` and drag the applications to your `Applications` directory.
|
||||||
|
|
||||||
|
3. You can then open your `Applications` directory and double-click on `Zoo Modeling App` to open.
|
||||||
|
|
||||||
|
|
||||||
|
## Linux
|
||||||
|
|
||||||
|
1. Download the [Zoo Modeling App installer](https://zoo.dev/modeling-app/download) for Linux and for your processor type.
|
||||||
|
|
||||||
|
2. Install the dependencies needed to run the [AppImage format](https://appimage.org/).
|
||||||
|
- On Ubuntu, install the FUSE library with these commands in a terminal.
|
||||||
|
```bash
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install libfuse2
|
||||||
|
```
|
||||||
|
- Optionally, follow [these steps](https://github.com/probonopd/go-appimage/blob/master/src/appimaged/README.md#initial-setup) to install `appimaged`. It is a daemon that makes interacting with AppImage files more seamless.
|
||||||
|
- Once installed, copy the downloaded `Zoo Modeling App-{version}-{arch}-linux.AppImage` to the directory of your choice, for instance `~/Applications`.
|
||||||
|
|
||||||
|
- `appimaged` should automatically find it and make it executable. If not, run:
|
||||||
|
```bash
|
||||||
|
chmod a+x ~/Applications/Zoo\ Modeling\ App-{version}-{arch}-linux.AppImage
|
||||||
|
```
|
||||||
|
|
||||||
|
3. You can double-click on the AppImage to run it, or in a terminal with this command:
|
||||||
|
```bash
|
||||||
|
~/Applications/Zoo\ Modeling\ App-{version}-{arch}-linux.AppImage
|
||||||
|
```
|
@ -7,6 +7,7 @@ export class ToolbarFixture {
|
|||||||
|
|
||||||
extrudeButton!: Locator
|
extrudeButton!: Locator
|
||||||
loftButton!: Locator
|
loftButton!: Locator
|
||||||
|
shellButton!: Locator
|
||||||
offsetPlaneButton!: Locator
|
offsetPlaneButton!: Locator
|
||||||
startSketchBtn!: Locator
|
startSketchBtn!: Locator
|
||||||
lineBtn!: Locator
|
lineBtn!: Locator
|
||||||
@ -28,6 +29,7 @@ export class ToolbarFixture {
|
|||||||
this.page = page
|
this.page = page
|
||||||
this.extrudeButton = page.getByTestId('extrude')
|
this.extrudeButton = page.getByTestId('extrude')
|
||||||
this.loftButton = page.getByTestId('loft')
|
this.loftButton = page.getByTestId('loft')
|
||||||
|
this.shellButton = page.getByTestId('shell')
|
||||||
this.offsetPlaneButton = page.getByTestId('plane-offset')
|
this.offsetPlaneButton = page.getByTestId('plane-offset')
|
||||||
this.startSketchBtn = page.getByTestId('sketch')
|
this.startSketchBtn = page.getByTestId('sketch')
|
||||||
this.lineBtn = page.getByTestId('line')
|
this.lineBtn = page.getByTestId('line')
|
||||||
|
@ -768,3 +768,166 @@ loftPointAndClickCases.forEach(({ shouldPreselect }) => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const shellPointAndClickCapCases = [
|
||||||
|
{ shouldPreselect: true },
|
||||||
|
{ shouldPreselect: false },
|
||||||
|
]
|
||||||
|
shellPointAndClickCapCases.forEach(({ shouldPreselect }) => {
|
||||||
|
test(`Shell point-and-click cap (preselected sketches: ${shouldPreselect})`, async ({
|
||||||
|
app,
|
||||||
|
scene,
|
||||||
|
editor,
|
||||||
|
toolbar,
|
||||||
|
cmdBar,
|
||||||
|
}) => {
|
||||||
|
const initialCode = `sketch001 = startSketchOn('XZ')
|
||||||
|
|> circle({ center = [0, 0], radius = 30 }, %)
|
||||||
|
extrude001 = extrude(30, sketch001)
|
||||||
|
`
|
||||||
|
await app.initialise(initialCode)
|
||||||
|
|
||||||
|
// One dumb hardcoded screen pixel value
|
||||||
|
const testPoint = { x: 575, y: 200 }
|
||||||
|
const [clickOnCap] = scene.makeMouseHelpers(testPoint.x, testPoint.y)
|
||||||
|
const shellDeclaration =
|
||||||
|
"shell001 = shell({ faces = ['end'], thickness = 5 }, extrude001)"
|
||||||
|
|
||||||
|
await test.step(`Look for the grey of the shape`, async () => {
|
||||||
|
await scene.expectPixelColor([127, 127, 127], testPoint, 15)
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!shouldPreselect) {
|
||||||
|
await test.step(`Go through the command bar flow without preselected faces`, async () => {
|
||||||
|
await toolbar.shellButton.click()
|
||||||
|
await cmdBar.expectState({
|
||||||
|
stage: 'arguments',
|
||||||
|
currentArgKey: 'selection',
|
||||||
|
currentArgValue: '',
|
||||||
|
headerArguments: {
|
||||||
|
Selection: '',
|
||||||
|
Thickness: '',
|
||||||
|
},
|
||||||
|
highlightedHeaderArg: 'selection',
|
||||||
|
commandName: 'Shell',
|
||||||
|
})
|
||||||
|
await clickOnCap()
|
||||||
|
await cmdBar.progressCmdBar()
|
||||||
|
await cmdBar.progressCmdBar()
|
||||||
|
await cmdBar.expectState({
|
||||||
|
stage: 'review',
|
||||||
|
headerArguments: {
|
||||||
|
Selection: '1 cap',
|
||||||
|
Thickness: '5',
|
||||||
|
},
|
||||||
|
commandName: 'Shell',
|
||||||
|
})
|
||||||
|
await cmdBar.progressCmdBar()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
await test.step(`Preselect the cap`, async () => {
|
||||||
|
await clickOnCap()
|
||||||
|
})
|
||||||
|
|
||||||
|
await test.step(`Go through the command bar flow with a preselected face (cap)`, async () => {
|
||||||
|
await toolbar.shellButton.click()
|
||||||
|
await cmdBar.progressCmdBar()
|
||||||
|
await cmdBar.progressCmdBar()
|
||||||
|
await cmdBar.expectState({
|
||||||
|
stage: 'review',
|
||||||
|
headerArguments: {
|
||||||
|
Selection: '1 cap',
|
||||||
|
Thickness: '5',
|
||||||
|
},
|
||||||
|
commandName: 'Shell',
|
||||||
|
})
|
||||||
|
await cmdBar.progressCmdBar()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
await test.step(`Confirm code is added to the editor, scene has changed`, async () => {
|
||||||
|
await editor.expectEditor.toContain(shellDeclaration)
|
||||||
|
await editor.expectState({
|
||||||
|
diagnostics: [],
|
||||||
|
activeLines: [shellDeclaration],
|
||||||
|
highlightedCode: '',
|
||||||
|
})
|
||||||
|
await scene.expectPixelColor([146, 146, 146], testPoint, 15)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
test('Shell point-and-click wall', async ({
|
||||||
|
app,
|
||||||
|
page,
|
||||||
|
scene,
|
||||||
|
editor,
|
||||||
|
toolbar,
|
||||||
|
cmdBar,
|
||||||
|
}) => {
|
||||||
|
const initialCode = `sketch001 = startSketchOn('XY')
|
||||||
|
|> startProfileAt([-20, 20], %)
|
||||||
|
|> xLine(40, %)
|
||||||
|
|> yLine(-60, %)
|
||||||
|
|> xLine(-40, %)
|
||||||
|
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|
|> close(%)
|
||||||
|
extrude001 = extrude(40, sketch001)
|
||||||
|
`
|
||||||
|
await app.initialise(initialCode)
|
||||||
|
|
||||||
|
// One dumb hardcoded screen pixel value
|
||||||
|
const testPoint = { x: 580, y: 180 }
|
||||||
|
const [clickOnCap] = scene.makeMouseHelpers(testPoint.x, testPoint.y)
|
||||||
|
const [clickOnWall] = scene.makeMouseHelpers(testPoint.x, testPoint.y + 70)
|
||||||
|
const mutatedCode = 'xLine(-40, %, $seg01)'
|
||||||
|
const shellDeclaration =
|
||||||
|
"shell001 = shell({ faces = ['end', seg01], thickness = 5}, extrude001)"
|
||||||
|
const formattedOutLastLine = '}, extrude001)'
|
||||||
|
|
||||||
|
await test.step(`Look for the grey of the shape`, async () => {
|
||||||
|
await scene.expectPixelColor([99, 99, 99], testPoint, 15)
|
||||||
|
})
|
||||||
|
|
||||||
|
await test.step(`Go through the command bar flow, selecting a wall and keeping default thickness`, async () => {
|
||||||
|
await toolbar.shellButton.click()
|
||||||
|
await cmdBar.expectState({
|
||||||
|
stage: 'arguments',
|
||||||
|
currentArgKey: 'selection',
|
||||||
|
currentArgValue: '',
|
||||||
|
headerArguments: {
|
||||||
|
Selection: '',
|
||||||
|
Thickness: '',
|
||||||
|
},
|
||||||
|
highlightedHeaderArg: 'selection',
|
||||||
|
commandName: 'Shell',
|
||||||
|
})
|
||||||
|
await clickOnCap()
|
||||||
|
await page.keyboard.down('Shift')
|
||||||
|
await clickOnWall()
|
||||||
|
await app.page.waitForTimeout(500)
|
||||||
|
await page.keyboard.up('Shift')
|
||||||
|
await cmdBar.progressCmdBar()
|
||||||
|
await cmdBar.progressCmdBar()
|
||||||
|
await cmdBar.expectState({
|
||||||
|
stage: 'review',
|
||||||
|
headerArguments: {
|
||||||
|
Selection: '1 cap, 1 face',
|
||||||
|
Thickness: '5',
|
||||||
|
},
|
||||||
|
commandName: 'Shell',
|
||||||
|
})
|
||||||
|
await cmdBar.progressCmdBar()
|
||||||
|
})
|
||||||
|
|
||||||
|
await test.step(`Confirm code is added to the editor, scene has changed`, async () => {
|
||||||
|
await editor.expectEditor.toContain(mutatedCode)
|
||||||
|
await editor.expectEditor.toContain(shellDeclaration)
|
||||||
|
await editor.expectState({
|
||||||
|
diagnostics: [],
|
||||||
|
activeLines: [formattedOutLastLine],
|
||||||
|
highlightedCode: '',
|
||||||
|
})
|
||||||
|
await scene.expectPixelColor([49, 49, 49], testPoint, 15)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
@ -81,6 +81,7 @@
|
|||||||
"simpleserver": "yarn pretest && http-server ./public --cors -p 3000",
|
"simpleserver": "yarn pretest && http-server ./public --cors -p 3000",
|
||||||
"simpleserver:ci": "yarn pretest && http-server ./public --cors -p 3000 &",
|
"simpleserver:ci": "yarn pretest && http-server ./public --cors -p 3000 &",
|
||||||
"simpleserver:bg": "yarn pretest && http-server ./public --cors -p 3000 &",
|
"simpleserver:bg": "yarn pretest && http-server ./public --cors -p 3000 &",
|
||||||
|
"simpleserver:stop": "kill-port 3000",
|
||||||
"fmt": "prettier --write ./src *.ts *.json *.js ./e2e ./packages",
|
"fmt": "prettier --write ./src *.ts *.json *.js ./e2e ./packages",
|
||||||
"fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e ./packages",
|
"fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e ./packages",
|
||||||
"fetch:wasm": "./get-latest-wasm-bundle.sh",
|
"fetch:wasm": "./get-latest-wasm-bundle.sh",
|
||||||
@ -95,6 +96,8 @@
|
|||||||
"files:set-version": "echo \"$(jq --arg v \"$VERSION\" '.version=$v' package.json --indent 2)\" > package.json",
|
"files:set-version": "echo \"$(jq --arg v \"$VERSION\" '.version=$v' package.json --indent 2)\" > package.json",
|
||||||
"files:set-notes": "./scripts/set-files-notes.sh",
|
"files:set-notes": "./scripts/set-files-notes.sh",
|
||||||
"files:flip-to-nightly": "./scripts/flip-files-to-nightly.sh",
|
"files:flip-to-nightly": "./scripts/flip-files-to-nightly.sh",
|
||||||
|
"files:invalidate-bucket": "./scripts/invalidate-files-bucket.sh",
|
||||||
|
"files:invalidate-bucket:nightly": "./scripts/invalidate-files-bucket.sh --nightly",
|
||||||
"postinstall": "yarn fetch:samples && yarn xstate:typegen && ./node_modules/.bin/electron-rebuild",
|
"postinstall": "yarn fetch:samples && yarn xstate:typegen && ./node_modules/.bin/electron-rebuild",
|
||||||
"xstate:typegen": "yarn xstate typegen \"src/**/*.ts?(x)\"",
|
"xstate:typegen": "yarn xstate typegen \"src/**/*.ts?(x)\"",
|
||||||
"make:dev": "make dev",
|
"make:dev": "make dev",
|
||||||
|
11
scripts/invalidate-files-bucket.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
base_dir="/releases/modeling-app"
|
||||||
|
if [[ $1 = "--nightly" ]]; then
|
||||||
|
base_dir="/releases/modeling-app/nightly"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Invalidating json and yml files at $base_dir in the download bucket"
|
||||||
|
gcloud compute url-maps invalidate-cdn-cache dl-url-map --path="$base_dir/last_download.json" --async
|
||||||
|
gcloud compute url-maps invalidate-cdn-cache dl-url-map --path="$base_dir/latest-linux-arm64.yml" --async
|
||||||
|
gcloud compute url-maps invalidate-cdn-cache dl-url-map --path="$base_dir/latest-mac.yml" --async
|
||||||
|
gcloud compute url-maps invalidate-cdn-cache dl-url-map --path="$base_dir/latest.yml" --async
|
@ -51,6 +51,7 @@ import {
|
|||||||
Selections,
|
Selections,
|
||||||
updateSelections,
|
updateSelections,
|
||||||
canLoftSelection,
|
canLoftSelection,
|
||||||
|
canShellSelection,
|
||||||
} from 'lib/selections'
|
} from 'lib/selections'
|
||||||
import { applyConstraintIntersect } from './Toolbar/Intersect'
|
import { applyConstraintIntersect } from './Toolbar/Intersect'
|
||||||
import { applyConstraintAbsDistance } from './Toolbar/SetAbsDistance'
|
import { applyConstraintAbsDistance } from './Toolbar/SetAbsDistance'
|
||||||
@ -69,6 +70,7 @@ import {
|
|||||||
} from 'lang/modifyAst'
|
} from 'lang/modifyAst'
|
||||||
import { Program, parse, recast, resultIsOk } from 'lang/wasm'
|
import { Program, parse, recast, resultIsOk } from 'lang/wasm'
|
||||||
import {
|
import {
|
||||||
|
doesSceneHaveExtrudedSketch,
|
||||||
doesSceneHaveSweepableSketch,
|
doesSceneHaveSweepableSketch,
|
||||||
getNodePathFromSourceRange,
|
getNodePathFromSourceRange,
|
||||||
isSingleCursorInPipe,
|
isSingleCursorInPipe,
|
||||||
@ -585,6 +587,24 @@ export const ModelingMachineProvider = ({
|
|||||||
if (err(canLoft)) return false
|
if (err(canLoft)) return false
|
||||||
return canLoft
|
return canLoft
|
||||||
},
|
},
|
||||||
|
'has valid shell selection': ({
|
||||||
|
context: { selectionRanges },
|
||||||
|
event,
|
||||||
|
}) => {
|
||||||
|
const hasNoSelection =
|
||||||
|
selectionRanges.graphSelections.length === 0 ||
|
||||||
|
isRangeBetweenCharacters(selectionRanges) ||
|
||||||
|
isSelectionLastLine(selectionRanges, codeManager.code)
|
||||||
|
|
||||||
|
if (hasNoSelection) {
|
||||||
|
return doesSceneHaveExtrudedSketch(kclManager.ast)
|
||||||
|
}
|
||||||
|
|
||||||
|
const canShell = canShellSelection(selectionRanges)
|
||||||
|
console.log('canShellSelection', canShellSelection(selectionRanges))
|
||||||
|
if (err(canShell)) return false
|
||||||
|
return canShell
|
||||||
|
},
|
||||||
'has valid selection for deletion': ({
|
'has valid selection for deletion': ({
|
||||||
context: { selectionRanges },
|
context: { selectionRanges },
|
||||||
}) => {
|
}) => {
|
||||||
|
@ -22,7 +22,7 @@ import {
|
|||||||
import { getNodeFromPath, getNodePathFromSourceRange } from '../queryAst'
|
import { getNodeFromPath, getNodePathFromSourceRange } from '../queryAst'
|
||||||
import { createLiteral } from 'lang/modifyAst'
|
import { createLiteral } from 'lang/modifyAst'
|
||||||
import { err } from 'lib/trap'
|
import { err } from 'lib/trap'
|
||||||
import { Selections } from 'lib/selections'
|
import { Selection, Selections } from 'lib/selections'
|
||||||
import { engineCommandManager, kclManager } from 'lib/singletons'
|
import { engineCommandManager, kclManager } from 'lib/singletons'
|
||||||
import { VITE_KC_DEV_TOKEN } from 'env'
|
import { VITE_KC_DEV_TOKEN } from 'env'
|
||||||
import { isOverlap } from 'lib/utils'
|
import { isOverlap } from 'lib/utils'
|
||||||
@ -118,13 +118,8 @@ const runGetPathToExtrudeForSegmentSelectionTest = async (
|
|||||||
code.indexOf(selectedSegmentSnippet) + selectedSegmentSnippet.length,
|
code.indexOf(selectedSegmentSnippet) + selectedSegmentSnippet.length,
|
||||||
true,
|
true,
|
||||||
]
|
]
|
||||||
const selection: Selections = {
|
const selection: Selection = {
|
||||||
graphSelections: [
|
codeRef: codeRefFromRange(segmentRange, ast),
|
||||||
{
|
|
||||||
codeRef: codeRefFromRange(segmentRange, ast),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
otherSelections: [],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// executeAst and artifactGraph
|
// executeAst and artifactGraph
|
||||||
|
@ -29,7 +29,7 @@ import {
|
|||||||
sketchLineHelperMap,
|
sketchLineHelperMap,
|
||||||
} from '../std/sketch'
|
} from '../std/sketch'
|
||||||
import { err, trap } from 'lib/trap'
|
import { err, trap } from 'lib/trap'
|
||||||
import { Selections } from 'lib/selections'
|
import { Selection, Selections } from 'lib/selections'
|
||||||
import { KclCommandValue } from 'lib/commandTypes'
|
import { KclCommandValue } from 'lib/commandTypes'
|
||||||
import {
|
import {
|
||||||
Artifact,
|
Artifact,
|
||||||
@ -99,14 +99,9 @@ export function modifyAstWithEdgeTreatmentAndTag(
|
|||||||
const lookupMap: Map<string, PathToNode> = new Map() // work around for Map key comparison
|
const lookupMap: Map<string, PathToNode> = new Map() // work around for Map key comparison
|
||||||
|
|
||||||
for (const selection of selections.graphSelections) {
|
for (const selection of selections.graphSelections) {
|
||||||
const singleSelection = {
|
|
||||||
graphSelections: [selection],
|
|
||||||
otherSelections: [],
|
|
||||||
}
|
|
||||||
|
|
||||||
const result = getPathToExtrudeForSegmentSelection(
|
const result = getPathToExtrudeForSegmentSelection(
|
||||||
clonedAstForGetExtrude,
|
clonedAstForGetExtrude,
|
||||||
singleSelection,
|
selection,
|
||||||
artifactGraph
|
artifactGraph
|
||||||
)
|
)
|
||||||
if (err(result)) return result
|
if (err(result)) return result
|
||||||
@ -259,12 +254,12 @@ function insertParametersIntoAst(
|
|||||||
|
|
||||||
export function getPathToExtrudeForSegmentSelection(
|
export function getPathToExtrudeForSegmentSelection(
|
||||||
ast: Program,
|
ast: Program,
|
||||||
selection: Selections,
|
selection: Selection,
|
||||||
artifactGraph: ArtifactGraph
|
artifactGraph: ArtifactGraph
|
||||||
): { pathToSegmentNode: PathToNode; pathToExtrudeNode: PathToNode } | Error {
|
): { pathToSegmentNode: PathToNode; pathToExtrudeNode: PathToNode } | Error {
|
||||||
const pathToSegmentNode = getNodePathFromSourceRange(
|
const pathToSegmentNode = getNodePathFromSourceRange(
|
||||||
ast,
|
ast,
|
||||||
selection.graphSelections[0]?.codeRef?.range
|
selection.codeRef?.range
|
||||||
)
|
)
|
||||||
|
|
||||||
const varDecNode = getNodeFromPath<VariableDeclaration>(
|
const varDecNode = getNodeFromPath<VariableDeclaration>(
|
||||||
@ -308,7 +303,7 @@ async function updateAstAndFocus(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function mutateAstWithTagForSketchSegment(
|
export function mutateAstWithTagForSketchSegment(
|
||||||
astClone: Node<Program>,
|
astClone: Node<Program>,
|
||||||
pathToSegmentNode: PathToNode
|
pathToSegmentNode: PathToNode
|
||||||
): { modifiedAst: Program; tag: string } | Error {
|
): { modifiedAst: Program; tag: string } | Error {
|
||||||
|
124
src/lang/modifyAst/addShell.ts
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
import { ArtifactGraph } from 'lang/std/artifactGraph'
|
||||||
|
import { Selections } from 'lib/selections'
|
||||||
|
import { Expr } from 'wasm-lib/kcl/bindings/Expr'
|
||||||
|
import { Program } from 'wasm-lib/kcl/bindings/Program'
|
||||||
|
import { Node } from 'wasm-lib/kcl/bindings/Node'
|
||||||
|
import { PathToNode, VariableDeclarator } from 'lang/wasm'
|
||||||
|
import {
|
||||||
|
getPathToExtrudeForSegmentSelection,
|
||||||
|
mutateAstWithTagForSketchSegment,
|
||||||
|
} from './addEdgeTreatment'
|
||||||
|
import { getNodeFromPath } from 'lang/queryAst'
|
||||||
|
import { err } from 'lib/trap'
|
||||||
|
import {
|
||||||
|
createLiteral,
|
||||||
|
createIdentifier,
|
||||||
|
findUniqueName,
|
||||||
|
createCallExpressionStdLib,
|
||||||
|
createObjectExpression,
|
||||||
|
createArrayExpression,
|
||||||
|
createVariableDeclaration,
|
||||||
|
} from 'lang/modifyAst'
|
||||||
|
import { KCL_DEFAULT_CONSTANT_PREFIXES } from 'lib/constants'
|
||||||
|
|
||||||
|
export function addShell({
|
||||||
|
node,
|
||||||
|
selection,
|
||||||
|
artifactGraph,
|
||||||
|
thickness,
|
||||||
|
}: {
|
||||||
|
node: Node<Program>
|
||||||
|
selection: Selections
|
||||||
|
artifactGraph: ArtifactGraph
|
||||||
|
thickness: Expr
|
||||||
|
}): Error | { modifiedAst: Node<Program>; pathToNode: PathToNode } {
|
||||||
|
const modifiedAst = structuredClone(node)
|
||||||
|
|
||||||
|
// Look up the corresponding extrude
|
||||||
|
const clonedAstForGetExtrude = structuredClone(modifiedAst)
|
||||||
|
|
||||||
|
const expressions: Expr[] = []
|
||||||
|
let pathToExtrudeNode: PathToNode | undefined = undefined
|
||||||
|
for (const graphSelection of selection.graphSelections) {
|
||||||
|
const extrudeLookupResult = getPathToExtrudeForSegmentSelection(
|
||||||
|
clonedAstForGetExtrude,
|
||||||
|
graphSelection,
|
||||||
|
artifactGraph
|
||||||
|
)
|
||||||
|
if (err(extrudeLookupResult)) {
|
||||||
|
return new Error("Couldn't find extrude")
|
||||||
|
}
|
||||||
|
|
||||||
|
pathToExtrudeNode = extrudeLookupResult.pathToExtrudeNode
|
||||||
|
// Get the sketch ref from the selection
|
||||||
|
// TODO: this assumes the segment is piped directly from the sketch, with no intermediate `VariableDeclarator` between.
|
||||||
|
// We must find a technique for these situations that is robust to intermediate declarations
|
||||||
|
const sketchNode = getNodeFromPath<VariableDeclarator>(
|
||||||
|
modifiedAst,
|
||||||
|
graphSelection.codeRef.pathToNode,
|
||||||
|
'VariableDeclarator'
|
||||||
|
)
|
||||||
|
if (err(sketchNode)) {
|
||||||
|
return sketchNode
|
||||||
|
}
|
||||||
|
|
||||||
|
const selectedArtifact = graphSelection.artifact
|
||||||
|
if (!selectedArtifact) {
|
||||||
|
return new Error('Bad artifact')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check on the selection, and handle the wall vs cap casees
|
||||||
|
let expr: Expr
|
||||||
|
if (selectedArtifact.type === 'cap') {
|
||||||
|
expr = createLiteral(selectedArtifact.subType)
|
||||||
|
} else if (selectedArtifact.type === 'wall') {
|
||||||
|
const tagResult = mutateAstWithTagForSketchSegment(
|
||||||
|
modifiedAst,
|
||||||
|
extrudeLookupResult.pathToSegmentNode
|
||||||
|
)
|
||||||
|
if (err(tagResult)) return tagResult
|
||||||
|
const { tag } = tagResult
|
||||||
|
expr = createIdentifier(tag)
|
||||||
|
} else {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
expressions.push(expr)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!pathToExtrudeNode) return new Error('No extrude found')
|
||||||
|
|
||||||
|
const extrudeNode = getNodeFromPath<VariableDeclarator>(
|
||||||
|
modifiedAst,
|
||||||
|
pathToExtrudeNode,
|
||||||
|
'VariableDeclarator'
|
||||||
|
)
|
||||||
|
if (err(extrudeNode)) {
|
||||||
|
return extrudeNode
|
||||||
|
}
|
||||||
|
|
||||||
|
const name = findUniqueName(node, KCL_DEFAULT_CONSTANT_PREFIXES.SHELL)
|
||||||
|
const shell = createCallExpressionStdLib('shell', [
|
||||||
|
createObjectExpression({
|
||||||
|
faces: createArrayExpression(expressions),
|
||||||
|
thickness,
|
||||||
|
}),
|
||||||
|
createIdentifier(extrudeNode.node.id.name),
|
||||||
|
])
|
||||||
|
const declaration = createVariableDeclaration(name, shell)
|
||||||
|
|
||||||
|
// TODO: check if we should append at the end like here or right after the extrude
|
||||||
|
modifiedAst.body.push(declaration)
|
||||||
|
const pathToNode: PathToNode = [
|
||||||
|
['body', ''],
|
||||||
|
[modifiedAst.body.length - 1, 'index'],
|
||||||
|
['declarations', 'VariableDeclaration'],
|
||||||
|
['0', 'index'],
|
||||||
|
['init', 'VariableDeclarator'],
|
||||||
|
['arguments', 'CallExpression'],
|
||||||
|
[0, 'index'],
|
||||||
|
]
|
||||||
|
return {
|
||||||
|
modifiedAst,
|
||||||
|
pathToNode,
|
||||||
|
}
|
||||||
|
}
|
@ -17,6 +17,7 @@ import {
|
|||||||
doesSceneHaveSweepableSketch,
|
doesSceneHaveSweepableSketch,
|
||||||
traverse,
|
traverse,
|
||||||
getNodeFromPath,
|
getNodeFromPath,
|
||||||
|
doesSceneHaveExtrudedSketch,
|
||||||
} from './queryAst'
|
} from './queryAst'
|
||||||
import { enginelessExecutor } from '../lib/testHelpers'
|
import { enginelessExecutor } from '../lib/testHelpers'
|
||||||
import {
|
import {
|
||||||
@ -654,6 +655,38 @@ extrude001 = extrude(10, sketch001)
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('Testing doesSceneHaveExtrudedSketch', () => {
|
||||||
|
it('finds extruded sketch as variable', async () => {
|
||||||
|
const exampleCode = `sketch001 = startSketchOn('XZ')
|
||||||
|
|> circle({ center = [0, 0], radius = 1 }, %)
|
||||||
|
extrude001 = extrude(1, sketch001)
|
||||||
|
`
|
||||||
|
const ast = parse(exampleCode)
|
||||||
|
if (err(ast)) throw ast
|
||||||
|
const extrudable = doesSceneHaveExtrudedSketch(ast)
|
||||||
|
expect(extrudable).toBeTruthy()
|
||||||
|
})
|
||||||
|
it('finds extruded sketch in pipe', async () => {
|
||||||
|
const exampleCode = `extrude001 = startSketchOn('XZ')
|
||||||
|
|> circle({ center = [0, 0], radius = 1 }, %)
|
||||||
|
|> extrude(1, %)
|
||||||
|
`
|
||||||
|
const ast = parse(exampleCode)
|
||||||
|
if (err(ast)) throw ast
|
||||||
|
const extrudable = doesSceneHaveExtrudedSketch(ast)
|
||||||
|
expect(extrudable).toBeTruthy()
|
||||||
|
})
|
||||||
|
it('finds no extrusion with sketch only', async () => {
|
||||||
|
const exampleCode = `extrude001 = startSketchOn('XZ')
|
||||||
|
|> circle({ center = [0, 0], radius = 1 }, %)
|
||||||
|
`
|
||||||
|
const ast = parse(exampleCode)
|
||||||
|
if (err(ast)) throw ast
|
||||||
|
const extrudable = doesSceneHaveExtrudedSketch(ast)
|
||||||
|
expect(extrudable).toBeFalsy()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('Testing traverse and pathToNode', () => {
|
describe('Testing traverse and pathToNode', () => {
|
||||||
it.each([
|
it.each([
|
||||||
['basic', '2.73'],
|
['basic', '2.73'],
|
||||||
|
@ -1064,6 +1064,35 @@ export function doesSceneHaveSweepableSketch(ast: Node<Program>, count = 1) {
|
|||||||
return Object.keys(theMap).length >= count
|
return Object.keys(theMap).length >= count
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function doesSceneHaveExtrudedSketch(ast: Node<Program>) {
|
||||||
|
const theMap: any = {}
|
||||||
|
traverse(ast as any, {
|
||||||
|
enter(node) {
|
||||||
|
if (
|
||||||
|
node.type === 'VariableDeclarator' &&
|
||||||
|
node.init?.type === 'PipeExpression'
|
||||||
|
) {
|
||||||
|
for (const pipe of node.init.body) {
|
||||||
|
if (
|
||||||
|
pipe.type === 'CallExpression' &&
|
||||||
|
pipe.callee.name === 'extrude'
|
||||||
|
) {
|
||||||
|
theMap[node.id.name] = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (
|
||||||
|
node.type === 'CallExpression' &&
|
||||||
|
node.callee.name === 'extrude' &&
|
||||||
|
node.arguments[1]?.type === 'Identifier'
|
||||||
|
) {
|
||||||
|
theMap[node.moduleId] = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
return Object.keys(theMap).length > 0
|
||||||
|
}
|
||||||
|
|
||||||
export function getObjExprProperty(
|
export function getObjExprProperty(
|
||||||
node: ObjectExpression,
|
node: ObjectExpression,
|
||||||
propName: string
|
propName: string
|
||||||
|
@ -34,6 +34,10 @@ export type ModelingCommandSchema = {
|
|||||||
Loft: {
|
Loft: {
|
||||||
selection: Selections
|
selection: Selections
|
||||||
}
|
}
|
||||||
|
Shell: {
|
||||||
|
selection: Selections
|
||||||
|
thickness: KclCommandValue
|
||||||
|
}
|
||||||
Revolve: {
|
Revolve: {
|
||||||
selection: Selections
|
selection: Selections
|
||||||
angle: KclCommandValue
|
angle: KclCommandValue
|
||||||
@ -277,6 +281,25 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Shell: {
|
||||||
|
description: 'Hollow out a 3D solid.',
|
||||||
|
icon: 'shell',
|
||||||
|
needsReview: true,
|
||||||
|
args: {
|
||||||
|
selection: {
|
||||||
|
inputType: 'selection',
|
||||||
|
selectionTypes: ['cap', 'wall'],
|
||||||
|
multiple: true,
|
||||||
|
required: true,
|
||||||
|
skip: false,
|
||||||
|
},
|
||||||
|
thickness: {
|
||||||
|
inputType: 'kcl',
|
||||||
|
defaultValue: KCL_DEFAULT_LENGTH,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
// TODO: Update this configuration, copied from extrude for MVP of revolve, specifically the args.selection
|
// TODO: Update this configuration, copied from extrude for MVP of revolve, specifically the args.selection
|
||||||
Revolve: {
|
Revolve: {
|
||||||
description: 'Create a 3D body by rotating a sketch region about an axis.',
|
description: 'Create a 3D body by rotating a sketch region about an axis.',
|
||||||
|
@ -53,6 +53,7 @@ export const KCL_DEFAULT_CONSTANT_PREFIXES = {
|
|||||||
SKETCH: 'sketch',
|
SKETCH: 'sketch',
|
||||||
EXTRUDE: 'extrude',
|
EXTRUDE: 'extrude',
|
||||||
LOFT: 'loft',
|
LOFT: 'loft',
|
||||||
|
SHELL: 'shell',
|
||||||
SEGMENT: 'seg',
|
SEGMENT: 'seg',
|
||||||
REVOLVE: 'revolve',
|
REVOLVE: 'revolve',
|
||||||
PLANE: 'plane',
|
PLANE: 'plane',
|
||||||
|
@ -585,6 +585,17 @@ export function canLoftSelection(selection: Selections) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function canShellSelection(selection: Selections) {
|
||||||
|
const commonNodes = selection.graphSelections.map((_, i) =>
|
||||||
|
buildCommonNodeFromSelection(selection, i)
|
||||||
|
)
|
||||||
|
return commonNodes.every(
|
||||||
|
(n) =>
|
||||||
|
n.selection.artifact?.type === 'cap' ||
|
||||||
|
n.selection.artifact?.type === 'wall'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// This accounts for non-geometry selections under "other"
|
// This accounts for non-geometry selections under "other"
|
||||||
export type ResolvedSelectionType = Artifact['type'] | 'other'
|
export type ResolvedSelectionType = Artifact['type'] | 'other'
|
||||||
export type SelectionCountsByType = Map<ResolvedSelectionType, number>
|
export type SelectionCountsByType = Map<ResolvedSelectionType, number>
|
||||||
|
@ -190,9 +190,15 @@ export const toolbarConfig: Record<ToolbarModeName, ToolbarMode> = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'shell',
|
id: 'shell',
|
||||||
onClick: () => console.error('Shell not yet implemented'),
|
onClick: ({ commandBarSend }) => {
|
||||||
|
commandBarSend({
|
||||||
|
type: 'Find and select command',
|
||||||
|
data: { name: 'Shell', groupId: 'modeling' },
|
||||||
|
})
|
||||||
|
},
|
||||||
|
disabled: (state) => !state.can({ type: 'Shell' }),
|
||||||
icon: 'shell',
|
icon: 'shell',
|
||||||
status: 'kcl-only',
|
status: 'available',
|
||||||
title: 'Shell',
|
title: 'Shell',
|
||||||
description: 'Hollow out a 3D solid.',
|
description: 'Hollow out a 3D solid.',
|
||||||
links: [{ label: 'KCL docs', url: 'https://zoo.dev/docs/kcl/shell' }],
|
links: [{ label: 'KCL docs', url: 'https://zoo.dev/docs/kcl/shell' }],
|
||||||
|
@ -80,6 +80,7 @@ import { ToolbarModeName } from 'lib/toolbar'
|
|||||||
import { quaternionFromUpNForward } from 'clientSideScene/helpers'
|
import { quaternionFromUpNForward } from 'clientSideScene/helpers'
|
||||||
import { Vector3 } from 'three'
|
import { Vector3 } from 'three'
|
||||||
import { MachineManager } from 'components/MachineManagerProvider'
|
import { MachineManager } from 'components/MachineManagerProvider'
|
||||||
|
import { addShell } from 'lang/modifyAst/addShell'
|
||||||
|
|
||||||
export const MODELING_PERSIST_KEY = 'MODELING_PERSIST_KEY'
|
export const MODELING_PERSIST_KEY = 'MODELING_PERSIST_KEY'
|
||||||
|
|
||||||
@ -260,6 +261,7 @@ export type ModelingMachineEvent =
|
|||||||
| { type: 'Make'; data: ModelingCommandSchema['Make'] }
|
| { type: 'Make'; data: ModelingCommandSchema['Make'] }
|
||||||
| { type: 'Extrude'; data?: ModelingCommandSchema['Extrude'] }
|
| { type: 'Extrude'; data?: ModelingCommandSchema['Extrude'] }
|
||||||
| { type: 'Loft'; data?: ModelingCommandSchema['Loft'] }
|
| { type: 'Loft'; data?: ModelingCommandSchema['Loft'] }
|
||||||
|
| { type: 'Shell'; data?: ModelingCommandSchema['Shell'] }
|
||||||
| { type: 'Revolve'; data?: ModelingCommandSchema['Revolve'] }
|
| { type: 'Revolve'; data?: ModelingCommandSchema['Revolve'] }
|
||||||
| { type: 'Fillet'; data?: ModelingCommandSchema['Fillet'] }
|
| { type: 'Fillet'; data?: ModelingCommandSchema['Fillet'] }
|
||||||
| { type: 'Offset plane'; data: ModelingCommandSchema['Offset plane'] }
|
| { type: 'Offset plane'; data: ModelingCommandSchema['Offset plane'] }
|
||||||
@ -392,6 +394,7 @@ export const modelingMachine = setup({
|
|||||||
'Selection is on face': () => false,
|
'Selection is on face': () => false,
|
||||||
'has valid sweep selection': () => false,
|
'has valid sweep selection': () => false,
|
||||||
'has valid loft selection': () => false,
|
'has valid loft selection': () => false,
|
||||||
|
'has valid shell selection': () => false,
|
||||||
'has valid edge treatment selection': () => false,
|
'has valid edge treatment selection': () => false,
|
||||||
'Has exportable geometry': () => false,
|
'Has exportable geometry': () => false,
|
||||||
'has valid selection for deletion': () => false,
|
'has valid selection for deletion': () => false,
|
||||||
@ -1584,6 +1587,66 @@ export const modelingMachine = setup({
|
|||||||
updateAstResult.newAst
|
updateAstResult.newAst
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (updateAstResult?.selections) {
|
||||||
|
editorManager.selectRange(updateAstResult?.selections)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
),
|
||||||
|
shellAstMod: fromPromise(
|
||||||
|
async ({
|
||||||
|
input,
|
||||||
|
}: {
|
||||||
|
input: ModelingCommandSchema['Shell'] | undefined
|
||||||
|
}) => {
|
||||||
|
if (!input) {
|
||||||
|
return new Error('No input provided')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Extract inputs
|
||||||
|
const ast = kclManager.ast
|
||||||
|
const { selection, thickness } = input
|
||||||
|
|
||||||
|
// Insert the thickness variable if it exists
|
||||||
|
if (
|
||||||
|
'variableName' in thickness &&
|
||||||
|
thickness.variableName &&
|
||||||
|
thickness.insertIndex !== undefined
|
||||||
|
) {
|
||||||
|
const newBody = [...ast.body]
|
||||||
|
newBody.splice(
|
||||||
|
thickness.insertIndex,
|
||||||
|
0,
|
||||||
|
thickness.variableDeclarationAst
|
||||||
|
)
|
||||||
|
ast.body = newBody
|
||||||
|
}
|
||||||
|
|
||||||
|
// Perform the shell op
|
||||||
|
const shellResult = addShell({
|
||||||
|
node: ast,
|
||||||
|
selection,
|
||||||
|
artifactGraph: engineCommandManager.artifactGraph,
|
||||||
|
thickness:
|
||||||
|
'variableName' in thickness
|
||||||
|
? thickness.variableIdentifierAst
|
||||||
|
: thickness.valueAst,
|
||||||
|
})
|
||||||
|
if (err(shellResult)) {
|
||||||
|
return err(shellResult)
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateAstResult = await kclManager.updateAst(
|
||||||
|
shellResult.modifiedAst,
|
||||||
|
true,
|
||||||
|
{
|
||||||
|
focusPath: [shellResult.pathToNode],
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
await codeManager.updateEditorWithAstAndWriteToFile(
|
||||||
|
updateAstResult.newAst
|
||||||
|
)
|
||||||
|
|
||||||
if (updateAstResult?.selections) {
|
if (updateAstResult?.selections) {
|
||||||
editorManager.selectRange(updateAstResult?.selections)
|
editorManager.selectRange(updateAstResult?.selections)
|
||||||
}
|
}
|
||||||
@ -1627,6 +1690,13 @@ export const modelingMachine = setup({
|
|||||||
|
|
||||||
Loft: {
|
Loft: {
|
||||||
target: 'Applying loft',
|
target: 'Applying loft',
|
||||||
|
guard: 'has valid loft selection',
|
||||||
|
reenter: true,
|
||||||
|
},
|
||||||
|
|
||||||
|
Shell: {
|
||||||
|
target: 'Applying shell',
|
||||||
|
guard: 'has valid shell selection',
|
||||||
reenter: true,
|
reenter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -2391,6 +2461,19 @@ export const modelingMachine = setup({
|
|||||||
onError: ['idle'],
|
onError: ['idle'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'Applying shell': {
|
||||||
|
invoke: {
|
||||||
|
src: 'shellAstMod',
|
||||||
|
id: 'shellAstMod',
|
||||||
|
input: ({ event }) => {
|
||||||
|
if (event.type !== 'Shell') return undefined
|
||||||
|
return event.data
|
||||||
|
},
|
||||||
|
onDone: ['idle'],
|
||||||
|
onError: ['idle'],
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
initial: 'idle',
|
initial: 'idle',
|
||||||
|
@ -645,7 +645,7 @@ async fn test_kcl_lsp_completions() {
|
|||||||
uri: "file:///test.kcl".try_into().unwrap(),
|
uri: "file:///test.kcl".try_into().unwrap(),
|
||||||
language_id: "kcl".to_string(),
|
language_id: "kcl".to_string(),
|
||||||
version: 1,
|
version: 1,
|
||||||
text: r#"const thing= 1
|
text: r#"thing= 1
|
||||||
st"#
|
st"#
|
||||||
.to_string(),
|
.to_string(),
|
||||||
},
|
},
|
||||||
@ -688,7 +688,7 @@ async fn test_kcl_lsp_completions_empty_in_comment() {
|
|||||||
uri: "file:///test.kcl".try_into().unwrap(),
|
uri: "file:///test.kcl".try_into().unwrap(),
|
||||||
language_id: "kcl".to_string(),
|
language_id: "kcl".to_string(),
|
||||||
version: 1,
|
version: 1,
|
||||||
text: r#"const thing= 1 // st"#.to_string(),
|
text: r#"thing= 1 // st"#.to_string(),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
@ -700,7 +700,7 @@ async fn test_kcl_lsp_completions_empty_in_comment() {
|
|||||||
text_document: tower_lsp::lsp_types::TextDocumentIdentifier {
|
text_document: tower_lsp::lsp_types::TextDocumentIdentifier {
|
||||||
uri: "file:///test.kcl".try_into().unwrap(),
|
uri: "file:///test.kcl".try_into().unwrap(),
|
||||||
},
|
},
|
||||||
position: tower_lsp::lsp_types::Position { line: 0, character: 19 },
|
position: tower_lsp::lsp_types::Position { line: 0, character: 13 },
|
||||||
},
|
},
|
||||||
context: None,
|
context: None,
|
||||||
partial_result_params: Default::default(),
|
partial_result_params: Default::default(),
|
||||||
@ -723,7 +723,7 @@ async fn test_kcl_lsp_completions_tags() {
|
|||||||
uri: "file:///test.kcl".try_into().unwrap(),
|
uri: "file:///test.kcl".try_into().unwrap(),
|
||||||
language_id: "kcl".to_string(),
|
language_id: "kcl".to_string(),
|
||||||
version: 1,
|
version: 1,
|
||||||
text: r#"const part001 = startSketchOn('XY')
|
text: r#"part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([11.19, 28.35], %)
|
|> startProfileAt([11.19, 28.35], %)
|
||||||
|> line([28.67, -13.25], %, $here)
|
|> line([28.67, -13.25], %, $here)
|
||||||
|> line([-4.12, -22.81], %)
|
|> line([-4.12, -22.81], %)
|
||||||
@ -1058,7 +1058,7 @@ async fn test_kcl_lsp_semantic_tokens_with_modifiers() {
|
|||||||
uri: "file:///test.kcl".try_into().unwrap(),
|
uri: "file:///test.kcl".try_into().unwrap(),
|
||||||
language_id: "kcl".to_string(),
|
language_id: "kcl".to_string(),
|
||||||
version: 1,
|
version: 1,
|
||||||
text: r#"const part001 = startSketchOn('XY')
|
text: r#"part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %, $seg01)
|
|> line([0, 20], %, $seg01)
|
||||||
@ -1066,8 +1066,8 @@ async fn test_kcl_lsp_semantic_tokens_with_modifiers() {
|
|||||||
|> close(%)
|
|> close(%)
|
||||||
|> extrude(3.14, %)
|
|> extrude(3.14, %)
|
||||||
|
|
||||||
const thing = {blah: "foo"}
|
thing = {blah: "foo"}
|
||||||
const bar = thing.blah
|
bar = thing.blah
|
||||||
|
|
||||||
fn myFn = (param1) => {
|
fn myFn = (param1) => {
|
||||||
return param1
|
return param1
|
||||||
@ -1230,7 +1230,7 @@ async fn test_kcl_lsp_semantic_tokens_multiple_comments() {
|
|||||||
// A ball bearing is a type of rolling-element bearing that uses balls to maintain the separation between the bearing races. The primary purpose of a ball bearing is to reduce rotational friction and support radial and axial loads.
|
// A ball bearing is a type of rolling-element bearing that uses balls to maintain the separation between the bearing races. The primary purpose of a ball bearing is to reduce rotational friction and support radial and axial loads.
|
||||||
|
|
||||||
// Define constants like ball diameter, inside diameter, overhange length, and thickness
|
// Define constants like ball diameter, inside diameter, overhange length, and thickness
|
||||||
const sphereDia = 0.5"#
|
sphereDia = 0.5"#
|
||||||
.to_string(),
|
.to_string(),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -1251,7 +1251,7 @@ const sphereDia = 0.5"#
|
|||||||
|
|
||||||
// Check the semantic tokens.
|
// Check the semantic tokens.
|
||||||
if let tower_lsp::lsp_types::SemanticTokensResult::Tokens(semantic_tokens) = semantic_tokens {
|
if let tower_lsp::lsp_types::SemanticTokensResult::Tokens(semantic_tokens) = semantic_tokens {
|
||||||
assert_eq!(semantic_tokens.data.len(), 7);
|
assert_eq!(semantic_tokens.data.len(), 6);
|
||||||
assert_eq!(semantic_tokens.data[0].length, 15);
|
assert_eq!(semantic_tokens.data[0].length, 15);
|
||||||
assert_eq!(semantic_tokens.data[0].delta_start, 0);
|
assert_eq!(semantic_tokens.data[0].delta_start, 0);
|
||||||
assert_eq!(semantic_tokens.data[0].delta_line, 0);
|
assert_eq!(semantic_tokens.data[0].delta_line, 0);
|
||||||
@ -1279,36 +1279,27 @@ const sphereDia = 0.5"#
|
|||||||
.get_semantic_token_type_index(&SemanticTokenType::COMMENT)
|
.get_semantic_token_type_index(&SemanticTokenType::COMMENT)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
);
|
);
|
||||||
assert_eq!(semantic_tokens.data[3].length, 5);
|
assert_eq!(semantic_tokens.data[3].length, 9);
|
||||||
assert_eq!(semantic_tokens.data[3].delta_start, 0);
|
assert_eq!(semantic_tokens.data[3].delta_start, 0);
|
||||||
assert_eq!(semantic_tokens.data[3].delta_line, 1);
|
assert_eq!(semantic_tokens.data[3].delta_line, 1);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
semantic_tokens.data[3].token_type,
|
semantic_tokens.data[3].token_type,
|
||||||
server
|
|
||||||
.get_semantic_token_type_index(&SemanticTokenType::KEYWORD)
|
|
||||||
.unwrap()
|
|
||||||
);
|
|
||||||
assert_eq!(semantic_tokens.data[4].length, 9);
|
|
||||||
assert_eq!(semantic_tokens.data[4].delta_start, 6);
|
|
||||||
assert_eq!(semantic_tokens.data[4].delta_line, 0);
|
|
||||||
assert_eq!(
|
|
||||||
semantic_tokens.data[4].token_type,
|
|
||||||
server
|
server
|
||||||
.get_semantic_token_type_index(&SemanticTokenType::VARIABLE)
|
.get_semantic_token_type_index(&SemanticTokenType::VARIABLE)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
);
|
);
|
||||||
assert_eq!(semantic_tokens.data[5].length, 1);
|
assert_eq!(semantic_tokens.data[4].length, 1);
|
||||||
assert_eq!(semantic_tokens.data[5].delta_start, 10);
|
assert_eq!(semantic_tokens.data[4].delta_start, 10);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
semantic_tokens.data[5].token_type,
|
semantic_tokens.data[4].token_type,
|
||||||
server
|
server
|
||||||
.get_semantic_token_type_index(&SemanticTokenType::OPERATOR)
|
.get_semantic_token_type_index(&SemanticTokenType::OPERATOR)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
);
|
);
|
||||||
assert_eq!(semantic_tokens.data[6].length, 3);
|
assert_eq!(semantic_tokens.data[5].length, 3);
|
||||||
assert_eq!(semantic_tokens.data[6].delta_start, 2);
|
assert_eq!(semantic_tokens.data[5].delta_start, 2);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
semantic_tokens.data[6].token_type,
|
semantic_tokens.data[5].token_type,
|
||||||
server
|
server
|
||||||
.get_semantic_token_type_index(&SemanticTokenType::NUMBER)
|
.get_semantic_token_type_index(&SemanticTokenType::NUMBER)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
@ -1329,7 +1320,7 @@ async fn test_kcl_lsp_document_symbol() {
|
|||||||
uri: "file:///test.kcl".try_into().unwrap(),
|
uri: "file:///test.kcl".try_into().unwrap(),
|
||||||
language_id: "kcl".to_string(),
|
language_id: "kcl".to_string(),
|
||||||
version: 1,
|
version: 1,
|
||||||
text: r#"const myVar = 1
|
text: r#"myVar = 1
|
||||||
startSketchOn('XY')"#
|
startSketchOn('XY')"#
|
||||||
.to_string(),
|
.to_string(),
|
||||||
},
|
},
|
||||||
@ -1369,7 +1360,7 @@ async fn test_kcl_lsp_document_symbol_tag() {
|
|||||||
uri: "file:///test.kcl".try_into().unwrap(),
|
uri: "file:///test.kcl".try_into().unwrap(),
|
||||||
language_id: "kcl".to_string(),
|
language_id: "kcl".to_string(),
|
||||||
version: 1,
|
version: 1,
|
||||||
text: r#"const part001 = startSketchOn('XY')
|
text: r#"part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([11.19, 28.35], %)
|
|> startProfileAt([11.19, 28.35], %)
|
||||||
|> line([28.67, -13.25], %, $here)
|
|> line([28.67, -13.25], %, $here)
|
||||||
|> line([-4.12, -22.81], %)
|
|> line([-4.12, -22.81], %)
|
||||||
@ -1466,13 +1457,13 @@ async fn test_kcl_lsp_formatting_extra_parens() {
|
|||||||
// A ball bearing is a type of rolling-element bearing that uses balls to maintain the separation between the bearing races. The primary purpose of a ball bearing is to reduce rotational friction and support radial and axial loads.
|
// A ball bearing is a type of rolling-element bearing that uses balls to maintain the separation between the bearing races. The primary purpose of a ball bearing is to reduce rotational friction and support radial and axial loads.
|
||||||
|
|
||||||
// Define constants like ball diameter, inside diameter, overhange length, and thickness
|
// Define constants like ball diameter, inside diameter, overhange length, and thickness
|
||||||
const sphereDia = 0.5
|
sphereDia = 0.5
|
||||||
const insideDia = 1
|
insideDia = 1
|
||||||
const thickness = 0.25
|
thickness = 0.25
|
||||||
const overHangLength = .4
|
overHangLength = .4
|
||||||
|
|
||||||
// Sketch and revolve the inside bearing piece
|
// Sketch and revolve the inside bearing piece
|
||||||
const insideRevolve = startSketchOn('XZ')
|
insideRevolve = startSketchOn('XZ')
|
||||||
|> startProfileAt([insideDia / 2, 0], %)
|
|> startProfileAt([insideDia / 2, 0], %)
|
||||||
|> line([0, thickness + sphereDia / 2], %)
|
|> line([0, thickness + sphereDia / 2], %)
|
||||||
|> line([overHangLength, 0], %)
|
|> line([overHangLength, 0], %)
|
||||||
@ -1486,7 +1477,7 @@ const insideRevolve = startSketchOn('XZ')
|
|||||||
|> revolve({ axis: 'y' }, %)
|
|> revolve({ axis: 'y' }, %)
|
||||||
|
|
||||||
// Sketch and revolve one of the balls and duplicate it using a circular pattern. (This is currently a workaround, we have a bug with rotating on a sketch that touches the rotation axis)
|
// Sketch and revolve one of the balls and duplicate it using a circular pattern. (This is currently a workaround, we have a bug with rotating on a sketch that touches the rotation axis)
|
||||||
const sphere = startSketchOn('XZ')
|
sphere = startSketchOn('XZ')
|
||||||
|> startProfileAt([
|
|> startProfileAt([
|
||||||
0.05 + insideDia / 2 + thickness,
|
0.05 + insideDia / 2 + thickness,
|
||||||
0 - 0.05
|
0 - 0.05
|
||||||
@ -1508,7 +1499,7 @@ const sphere = startSketchOn('XZ')
|
|||||||
}, %)
|
}, %)
|
||||||
|
|
||||||
// Sketch and revolve the outside bearing
|
// Sketch and revolve the outside bearing
|
||||||
const outsideRevolve = startSketchOn('XZ')
|
outsideRevolve = startSketchOn('XZ')
|
||||||
|> startProfileAt([
|
|> startProfileAt([
|
||||||
insideDia / 2 + thickness + sphereDia,
|
insideDia / 2 + thickness + sphereDia,
|
||||||
0
|
0
|
||||||
@ -1638,7 +1629,7 @@ async fn test_kcl_lsp_rename() {
|
|||||||
uri: "file:///test.kcl".try_into().unwrap(),
|
uri: "file:///test.kcl".try_into().unwrap(),
|
||||||
language_id: "kcl".to_string(),
|
language_id: "kcl".to_string(),
|
||||||
version: 1,
|
version: 1,
|
||||||
text: r#"const thing= 1"#.to_string(),
|
text: r#"thing= 1"#.to_string(),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
@ -1650,7 +1641,7 @@ async fn test_kcl_lsp_rename() {
|
|||||||
text_document: tower_lsp::lsp_types::TextDocumentIdentifier {
|
text_document: tower_lsp::lsp_types::TextDocumentIdentifier {
|
||||||
uri: "file:///test.kcl".try_into().unwrap(),
|
uri: "file:///test.kcl".try_into().unwrap(),
|
||||||
},
|
},
|
||||||
position: tower_lsp::lsp_types::Position { line: 0, character: 8 },
|
position: tower_lsp::lsp_types::Position { line: 0, character: 2 },
|
||||||
},
|
},
|
||||||
new_name: "newName".to_string(),
|
new_name: "newName".to_string(),
|
||||||
work_done_progress_params: Default::default(),
|
work_done_progress_params: Default::default(),
|
||||||
@ -1667,7 +1658,7 @@ async fn test_kcl_lsp_rename() {
|
|||||||
vec![tower_lsp::lsp_types::TextEdit {
|
vec![tower_lsp::lsp_types::TextEdit {
|
||||||
range: tower_lsp::lsp_types::Range {
|
range: tower_lsp::lsp_types::Range {
|
||||||
start: tower_lsp::lsp_types::Position { line: 0, character: 0 },
|
start: tower_lsp::lsp_types::Position { line: 0, character: 0 },
|
||||||
end: tower_lsp::lsp_types::Position { line: 0, character: 13 }
|
end: tower_lsp::lsp_types::Position { line: 0, character: 7 }
|
||||||
},
|
},
|
||||||
new_text: "newName = 1\n".to_string()
|
new_text: "newName = 1\n".to_string()
|
||||||
}]
|
}]
|
||||||
@ -1773,7 +1764,7 @@ async fn test_kcl_lsp_diagnostic_has_lints() {
|
|||||||
uri: "file:///testlint.kcl".try_into().unwrap(),
|
uri: "file:///testlint.kcl".try_into().unwrap(),
|
||||||
language_id: "kcl".to_string(),
|
language_id: "kcl".to_string(),
|
||||||
version: 1,
|
version: 1,
|
||||||
text: r#"let THING = 10"#.to_string(),
|
text: r#"THING = 10"#.to_string(),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
@ -1859,7 +1850,7 @@ async fn test_copilot_lsp_completions_raw() {
|
|||||||
let completions = server
|
let completions = server
|
||||||
.get_completions(
|
.get_completions(
|
||||||
"kcl".to_string(),
|
"kcl".to_string(),
|
||||||
r#"const bracket = startSketchOn('XY')
|
r#"bracket = startSketchOn('XY')
|
||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
"#
|
"#
|
||||||
.to_string(),
|
.to_string(),
|
||||||
@ -1878,7 +1869,7 @@ async fn test_copilot_lsp_completions_raw() {
|
|||||||
let completions_hit_cache = server
|
let completions_hit_cache = server
|
||||||
.get_completions(
|
.get_completions(
|
||||||
"kcl".to_string(),
|
"kcl".to_string(),
|
||||||
r#"const bracket = startSketchOn('XY')
|
r#"bracket = startSketchOn('XY')
|
||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
"#
|
"#
|
||||||
.to_string(),
|
.to_string(),
|
||||||
@ -1918,7 +1909,7 @@ async fn test_copilot_lsp_completions() {
|
|||||||
path: "file:///test.copilot".to_string(),
|
path: "file:///test.copilot".to_string(),
|
||||||
position: crate::lsp::copilot::types::CopilotPosition { line: 3, character: 3 },
|
position: crate::lsp::copilot::types::CopilotPosition { line: 3, character: 3 },
|
||||||
relative_path: "test.copilot".to_string(),
|
relative_path: "test.copilot".to_string(),
|
||||||
source: r#"const bracket = startSketchOn('XY')
|
source: r#"bracket = startSketchOn('XY')
|
||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
|
|
||||||
|> close(%)
|
|> close(%)
|
||||||
@ -2066,7 +2057,7 @@ async fn test_lsp_initialized() {
|
|||||||
async fn test_kcl_lsp_on_change_update_ast() {
|
async fn test_kcl_lsp_on_change_update_ast() {
|
||||||
let server = kcl_lsp_server(false).await.unwrap();
|
let server = kcl_lsp_server(false).await.unwrap();
|
||||||
|
|
||||||
let same_text = r#"const thing = 1"#.to_string();
|
let same_text = r#"thing = 1"#.to_string();
|
||||||
|
|
||||||
// Send open file.
|
// Send open file.
|
||||||
server
|
server
|
||||||
@ -2102,7 +2093,7 @@ async fn test_kcl_lsp_on_change_update_ast() {
|
|||||||
assert_eq!(ast, server.ast_map.get("file:///test.kcl").unwrap().clone());
|
assert_eq!(ast, server.ast_map.get("file:///test.kcl").unwrap().clone());
|
||||||
|
|
||||||
// Update the text.
|
// Update the text.
|
||||||
let new_text = r#"const thing = 2"#.to_string();
|
let new_text = r#"thing = 2"#.to_string();
|
||||||
// Send change file.
|
// Send change file.
|
||||||
server
|
server
|
||||||
.did_change(tower_lsp::lsp_types::DidChangeTextDocumentParams {
|
.did_change(tower_lsp::lsp_types::DidChangeTextDocumentParams {
|
||||||
@ -2128,7 +2119,7 @@ async fn test_kcl_lsp_on_change_update_ast() {
|
|||||||
async fn kcl_test_kcl_lsp_on_change_update_memory() {
|
async fn kcl_test_kcl_lsp_on_change_update_memory() {
|
||||||
let server = kcl_lsp_server(true).await.unwrap();
|
let server = kcl_lsp_server(true).await.unwrap();
|
||||||
|
|
||||||
let same_text = r#"const thing = 1"#.to_string();
|
let same_text = r#"thing = 1"#.to_string();
|
||||||
|
|
||||||
// Send open file.
|
// Send open file.
|
||||||
server
|
server
|
||||||
@ -2164,7 +2155,7 @@ async fn kcl_test_kcl_lsp_on_change_update_memory() {
|
|||||||
assert_eq!(memory, server.memory_map.get("file:///test.kcl").unwrap().clone());
|
assert_eq!(memory, server.memory_map.get("file:///test.kcl").unwrap().clone());
|
||||||
|
|
||||||
// Update the text.
|
// Update the text.
|
||||||
let new_text = r#"const thing = 2"#.to_string();
|
let new_text = r#"thing = 2"#.to_string();
|
||||||
// Send change file.
|
// Send change file.
|
||||||
server
|
server
|
||||||
.did_change(tower_lsp::lsp_types::DidChangeTextDocumentParams {
|
.did_change(tower_lsp::lsp_types::DidChangeTextDocumentParams {
|
||||||
@ -2188,7 +2179,7 @@ async fn kcl_test_kcl_lsp_update_units() {
|
|||||||
let server = kcl_lsp_server(true).await.unwrap();
|
let server = kcl_lsp_server(true).await.unwrap();
|
||||||
|
|
||||||
let same_text = r#"fn cube = (pos, scale) => {
|
let same_text = r#"fn cube = (pos, scale) => {
|
||||||
const sg = startSketchOn('XY')
|
sg = startSketchOn('XY')
|
||||||
|> startProfileAt(pos, %)
|
|> startProfileAt(pos, %)
|
||||||
|> line([0, scale], %)
|
|> line([0, scale], %)
|
||||||
|> line([scale, 0], %)
|
|> line([scale, 0], %)
|
||||||
@ -2196,7 +2187,7 @@ async fn kcl_test_kcl_lsp_update_units() {
|
|||||||
|
|
||||||
return sg
|
return sg
|
||||||
}
|
}
|
||||||
const part001 = cube([0,0], 20)
|
part001 = cube([0,0], 20)
|
||||||
|> close(%)
|
|> close(%)
|
||||||
|> extrude(20, %)"#
|
|> extrude(20, %)"#
|
||||||
.to_string();
|
.to_string();
|
||||||
@ -2215,7 +2206,7 @@ const part001 = cube([0,0], 20)
|
|||||||
|
|
||||||
// Get the tokens.
|
// Get the tokens.
|
||||||
let tokens = server.token_map.get("file:///test.kcl").unwrap().clone();
|
let tokens = server.token_map.get("file:///test.kcl").unwrap().clone();
|
||||||
assert_eq!(tokens.len(), 124);
|
assert_eq!(tokens.len(), 120);
|
||||||
|
|
||||||
// Get the ast.
|
// Get the ast.
|
||||||
let ast = server.ast_map.get("file:///test.kcl").unwrap().clone();
|
let ast = server.ast_map.get("file:///test.kcl").unwrap().clone();
|
||||||
@ -2305,7 +2296,7 @@ async fn test_kcl_lsp_diagnostics_on_parse_error() {
|
|||||||
assert_diagnostic_count(server.diagnostics_map.get("file:///test.kcl").as_deref(), 1);
|
assert_diagnostic_count(server.diagnostics_map.get("file:///test.kcl").as_deref(), 1);
|
||||||
|
|
||||||
// Update the text.
|
// Update the text.
|
||||||
let new_text = r#"const thing = 2"#.to_string();
|
let new_text = r#"thing = 2"#.to_string();
|
||||||
// Send change file.
|
// Send change file.
|
||||||
server
|
server
|
||||||
.did_change(tower_lsp::lsp_types::DidChangeTextDocumentParams {
|
.did_change(tower_lsp::lsp_types::DidChangeTextDocumentParams {
|
||||||
@ -2336,7 +2327,7 @@ async fn kcl_test_kcl_lsp_diagnostics_on_execution_error() {
|
|||||||
uri: "file:///test.kcl".try_into().unwrap(),
|
uri: "file:///test.kcl".try_into().unwrap(),
|
||||||
language_id: "kcl".to_string(),
|
language_id: "kcl".to_string(),
|
||||||
version: 1,
|
version: 1,
|
||||||
text: r#"const part001 = startSketchOn('XY')
|
text: r#"part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %)
|
|> line([0, 20], %)
|
||||||
@ -2356,7 +2347,7 @@ async fn kcl_test_kcl_lsp_diagnostics_on_execution_error() {
|
|||||||
assert_diagnostic_count(server.diagnostics_map.get("file:///test.kcl").as_deref(), 1);
|
assert_diagnostic_count(server.diagnostics_map.get("file:///test.kcl").as_deref(), 1);
|
||||||
|
|
||||||
// Update the text.
|
// Update the text.
|
||||||
let new_text = r#"const part001 = startSketchOn('XY')
|
let new_text = r#"part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %)
|
|> line([0, 20], %)
|
||||||
@ -2394,7 +2385,7 @@ async fn kcl_test_kcl_lsp_full_to_empty_file_updates_ast_and_memory() {
|
|||||||
uri: "file:///test.kcl".try_into().unwrap(),
|
uri: "file:///test.kcl".try_into().unwrap(),
|
||||||
language_id: "kcl".to_string(),
|
language_id: "kcl".to_string(),
|
||||||
version: 1,
|
version: 1,
|
||||||
text: r#"const part001 = startSketchOn('XY')
|
text: r#"part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %)
|
|> line([0, 20], %)
|
||||||
@ -2443,7 +2434,7 @@ async fn kcl_test_kcl_lsp_full_to_empty_file_updates_ast_and_memory() {
|
|||||||
async fn kcl_test_kcl_lsp_code_unchanged_but_has_diagnostics_reexecute() {
|
async fn kcl_test_kcl_lsp_code_unchanged_but_has_diagnostics_reexecute() {
|
||||||
let server = kcl_lsp_server(true).await.unwrap();
|
let server = kcl_lsp_server(true).await.unwrap();
|
||||||
|
|
||||||
let code = r#"const part001 = startSketchOn('XY')
|
let code = r#"part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %)
|
|> line([0, 20], %)
|
||||||
@ -2536,7 +2527,7 @@ async fn kcl_test_kcl_lsp_code_unchanged_but_has_diagnostics_reexecute() {
|
|||||||
async fn kcl_test_kcl_lsp_code_and_ast_unchanged_but_has_diagnostics_reexecute() {
|
async fn kcl_test_kcl_lsp_code_and_ast_unchanged_but_has_diagnostics_reexecute() {
|
||||||
let server = kcl_lsp_server(true).await.unwrap();
|
let server = kcl_lsp_server(true).await.unwrap();
|
||||||
|
|
||||||
let code = r#"const part001 = startSketchOn('XY')
|
let code = r#"part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %)
|
|> line([0, 20], %)
|
||||||
@ -2624,7 +2615,7 @@ async fn kcl_test_kcl_lsp_code_and_ast_unchanged_but_has_diagnostics_reexecute()
|
|||||||
async fn kcl_test_kcl_lsp_code_and_ast_units_unchanged_but_has_diagnostics_reexecute_on_unit_change() {
|
async fn kcl_test_kcl_lsp_code_and_ast_units_unchanged_but_has_diagnostics_reexecute_on_unit_change() {
|
||||||
let server = kcl_lsp_server(true).await.unwrap();
|
let server = kcl_lsp_server(true).await.unwrap();
|
||||||
|
|
||||||
let code = r#"const part001 = startSketchOn('XY')
|
let code = r#"part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %)
|
|> line([0, 20], %)
|
||||||
@ -2715,7 +2706,7 @@ async fn kcl_test_kcl_lsp_code_and_ast_units_unchanged_but_has_diagnostics_reexe
|
|||||||
async fn kcl_test_kcl_lsp_code_and_ast_units_unchanged_but_has_memory_reexecute_on_unit_change() {
|
async fn kcl_test_kcl_lsp_code_and_ast_units_unchanged_but_has_memory_reexecute_on_unit_change() {
|
||||||
let server = kcl_lsp_server(true).await.unwrap();
|
let server = kcl_lsp_server(true).await.unwrap();
|
||||||
|
|
||||||
let code = r#"const part001 = startSketchOn('XY')
|
let code = r#"part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %)
|
|> line([0, 20], %)
|
||||||
@ -2785,7 +2776,7 @@ async fn kcl_test_kcl_lsp_code_and_ast_units_unchanged_but_has_memory_reexecute_
|
|||||||
async fn kcl_test_kcl_lsp_cant_execute_set() {
|
async fn kcl_test_kcl_lsp_cant_execute_set() {
|
||||||
let server = kcl_lsp_server(true).await.unwrap();
|
let server = kcl_lsp_server(true).await.unwrap();
|
||||||
|
|
||||||
let code = r#"const part001 = startSketchOn('XY')
|
let code = r#"part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %)
|
|> line([0, 20], %)
|
||||||
@ -2982,7 +2973,7 @@ async fn test_kcl_lsp_folding() {
|
|||||||
async fn kcl_test_kcl_lsp_code_with_parse_error_and_ast_unchanged_but_has_diagnostics_reparse() {
|
async fn kcl_test_kcl_lsp_code_with_parse_error_and_ast_unchanged_but_has_diagnostics_reparse() {
|
||||||
let server = kcl_lsp_server(false).await.unwrap();
|
let server = kcl_lsp_server(false).await.unwrap();
|
||||||
|
|
||||||
let code = r#"const part001 = startSketchOn('XY')
|
let code = r#"part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %)
|
|> line([0, 20], %)
|
||||||
@ -3036,8 +3027,8 @@ async fn kcl_test_kcl_lsp_code_with_parse_error_and_ast_unchanged_but_has_diagno
|
|||||||
async fn kcl_test_kcl_lsp_code_with_lint_and_ast_unchanged_but_has_diagnostics_reparse() {
|
async fn kcl_test_kcl_lsp_code_with_lint_and_ast_unchanged_but_has_diagnostics_reparse() {
|
||||||
let server = kcl_lsp_server(false).await.unwrap();
|
let server = kcl_lsp_server(false).await.unwrap();
|
||||||
|
|
||||||
let code = r#"const LINT = 1
|
let code = r#"LINT = 1
|
||||||
const part001 = startSketchOn('XY')
|
part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %)
|
|> line([0, 20], %)
|
||||||
@ -3090,8 +3081,8 @@ const part001 = startSketchOn('XY')
|
|||||||
async fn kcl_test_kcl_lsp_code_with_lint_and_parse_error_and_ast_unchanged_but_has_diagnostics_reparse() {
|
async fn kcl_test_kcl_lsp_code_with_lint_and_parse_error_and_ast_unchanged_but_has_diagnostics_reparse() {
|
||||||
let server = kcl_lsp_server(false).await.unwrap();
|
let server = kcl_lsp_server(false).await.unwrap();
|
||||||
|
|
||||||
let code = r#"const LINT = 1
|
let code = r#"LINT = 1
|
||||||
const part001 = startSketchOn('XY')
|
part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %)
|
|> line([0, 20], %)
|
||||||
@ -3145,8 +3136,8 @@ const part001 = startSketchOn('XY')
|
|||||||
async fn kcl_test_kcl_lsp_code_lint_and_ast_unchanged_but_has_diagnostics_reexecute() {
|
async fn kcl_test_kcl_lsp_code_lint_and_ast_unchanged_but_has_diagnostics_reexecute() {
|
||||||
let server = kcl_lsp_server(true).await.unwrap();
|
let server = kcl_lsp_server(true).await.unwrap();
|
||||||
|
|
||||||
let code = r#"const LINT = 1
|
let code = r#"LINT = 1
|
||||||
const part001 = startSketchOn('XY')
|
part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %, $seg01)
|
|> line([0, 20], %, $seg01)
|
||||||
@ -3210,8 +3201,8 @@ const part001 = startSketchOn('XY')
|
|||||||
async fn kcl_test_kcl_lsp_code_lint_reexecute_new_lint() {
|
async fn kcl_test_kcl_lsp_code_lint_reexecute_new_lint() {
|
||||||
let server = kcl_lsp_server(true).await.unwrap();
|
let server = kcl_lsp_server(true).await.unwrap();
|
||||||
|
|
||||||
let code = r#"const LINT = 1
|
let code = r#"LINT = 1
|
||||||
const part001 = startSketchOn('XY')
|
part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %, $seg01)
|
|> line([0, 20], %, $seg01)
|
||||||
@ -3253,14 +3244,14 @@ const part001 = startSketchOn('XY')
|
|||||||
content_changes: vec![tower_lsp::lsp_types::TextDocumentContentChangeEvent {
|
content_changes: vec![tower_lsp::lsp_types::TextDocumentContentChangeEvent {
|
||||||
range: None,
|
range: None,
|
||||||
range_length: None,
|
range_length: None,
|
||||||
text: r#"const part001 = startSketchOn('XY')
|
text: r#"part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %, $seg01)
|
|> line([0, 20], %, $seg01)
|
||||||
|> line([-20, 0], %, $seg01)
|
|> line([-20, 0], %, $seg01)
|
||||||
|> close(%)
|
|> close(%)
|
||||||
|> extrude(3.14, %)
|
|> extrude(3.14, %)
|
||||||
const NEW_LINT = 1"#
|
NEW_LINT = 1"#
|
||||||
.to_string(),
|
.to_string(),
|
||||||
}],
|
}],
|
||||||
})
|
})
|
||||||
@ -3283,8 +3274,8 @@ const NEW_LINT = 1"#
|
|||||||
async fn kcl_test_kcl_lsp_code_lint_reexecute_new_ast_error() {
|
async fn kcl_test_kcl_lsp_code_lint_reexecute_new_ast_error() {
|
||||||
let server = kcl_lsp_server(true).await.unwrap();
|
let server = kcl_lsp_server(true).await.unwrap();
|
||||||
|
|
||||||
let code = r#"const LINT = 1
|
let code = r#"LINT = 1
|
||||||
const part001 = startSketchOn('XY')
|
part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %, $seg01)
|
|> line([0, 20], %, $seg01)
|
||||||
@ -3326,14 +3317,14 @@ const part001 = startSketchOn('XY')
|
|||||||
content_changes: vec![tower_lsp::lsp_types::TextDocumentContentChangeEvent {
|
content_changes: vec![tower_lsp::lsp_types::TextDocumentContentChangeEvent {
|
||||||
range: None,
|
range: None,
|
||||||
range_length: None,
|
range_length: None,
|
||||||
text: r#"const part001 = startSketchOn('XY')
|
text: r#"part001 = startSketchOn('XY')
|
||||||
|> ^^^^startProfileAt([-10, -10], %)
|
|> ^^^^startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %, $seg01)
|
|> line([0, 20], %, $seg01)
|
||||||
|> line([-20, 0], %, $seg01)
|
|> line([-20, 0], %, $seg01)
|
||||||
|> close(%)
|
|> close(%)
|
||||||
|> extrude(3.14, %)
|
|> extrude(3.14, %)
|
||||||
const NEW_LINT = 1"#
|
NEW_LINT = 1"#
|
||||||
.to_string(),
|
.to_string(),
|
||||||
}],
|
}],
|
||||||
})
|
})
|
||||||
@ -3356,8 +3347,8 @@ const NEW_LINT = 1"#
|
|||||||
async fn kcl_test_kcl_lsp_code_lint_reexecute_had_lint_new_parse_error() {
|
async fn kcl_test_kcl_lsp_code_lint_reexecute_had_lint_new_parse_error() {
|
||||||
let server = kcl_lsp_server(true).await.unwrap();
|
let server = kcl_lsp_server(true).await.unwrap();
|
||||||
|
|
||||||
let code = r#"const LINT = 1
|
let code = r#"LINT = 1
|
||||||
const part001 = startSketchOn('XY')
|
part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %)
|
|> line([0, 20], %)
|
||||||
@ -3408,14 +3399,14 @@ const part001 = startSketchOn('XY')
|
|||||||
content_changes: vec![tower_lsp::lsp_types::TextDocumentContentChangeEvent {
|
content_changes: vec![tower_lsp::lsp_types::TextDocumentContentChangeEvent {
|
||||||
range: None,
|
range: None,
|
||||||
range_length: None,
|
range_length: None,
|
||||||
text: r#"const part001 = startSketchOn('XY')
|
text: r#"part001 = startSketchOn('XY')
|
||||||
|> ^^^^startProfileAt([-10, -10], %)
|
|> ^^^^startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %)
|
|> line([0, 20], %)
|
||||||
|> line([-20, 0], %)
|
|> line([-20, 0], %)
|
||||||
|> close(%)
|
|> close(%)
|
||||||
|> extrude(3.14, %)
|
|> extrude(3.14, %)
|
||||||
const NEW_LINT = 1"#
|
NEW_LINT = 1"#
|
||||||
.to_string(),
|
.to_string(),
|
||||||
}],
|
}],
|
||||||
})
|
})
|
||||||
@ -3447,8 +3438,8 @@ const NEW_LINT = 1"#
|
|||||||
async fn kcl_test_kcl_lsp_code_lint_reexecute_had_lint_new_execution_error() {
|
async fn kcl_test_kcl_lsp_code_lint_reexecute_had_lint_new_execution_error() {
|
||||||
let server = kcl_lsp_server(true).await.unwrap();
|
let server = kcl_lsp_server(true).await.unwrap();
|
||||||
|
|
||||||
let code = r#"const LINT = 1
|
let code = r#"LINT = 1
|
||||||
const part001 = startSketchOn('XY')
|
part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
|> line([0, 20], %)
|
|> line([0, 20], %)
|
||||||
@ -3503,8 +3494,8 @@ const part001 = startSketchOn('XY')
|
|||||||
content_changes: vec![tower_lsp::lsp_types::TextDocumentContentChangeEvent {
|
content_changes: vec![tower_lsp::lsp_types::TextDocumentContentChangeEvent {
|
||||||
range: None,
|
range: None,
|
||||||
range_length: None,
|
range_length: None,
|
||||||
text: r#"const LINT = 1
|
text: r#"LINT = 1
|
||||||
const part001 = startSketchOn('XY')
|
part001 = startSketchOn('XY')
|
||||||
|> startProfileAt([-10, -10], %)
|
|> startProfileAt([-10, -10], %)
|
||||||
|> line([20, 0], %, $seg01)
|
|> line([20, 0], %, $seg01)
|
||||||
|> line([0, 20], %, $seg01)
|
|> line([0, 20], %, $seg01)
|
||||||
@ -3552,7 +3543,7 @@ async fn kcl_test_kcl_lsp_completions_number_literal() {
|
|||||||
uri: "file:///test.kcl".try_into().unwrap(),
|
uri: "file:///test.kcl".try_into().unwrap(),
|
||||||
language_id: "kcl".to_string(),
|
language_id: "kcl".to_string(),
|
||||||
version: 1,
|
version: 1,
|
||||||
text: "const thing = 10".to_string(),
|
text: "thing = 10".to_string(),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
@ -3563,7 +3554,7 @@ async fn kcl_test_kcl_lsp_completions_number_literal() {
|
|||||||
text_document: tower_lsp::lsp_types::TextDocumentIdentifier {
|
text_document: tower_lsp::lsp_types::TextDocumentIdentifier {
|
||||||
uri: "file:///test.kcl".try_into().unwrap(),
|
uri: "file:///test.kcl".try_into().unwrap(),
|
||||||
},
|
},
|
||||||
position: tower_lsp::lsp_types::Position { line: 0, character: 15 },
|
position: tower_lsp::lsp_types::Position { line: 0, character: 10 },
|
||||||
},
|
},
|
||||||
context: None,
|
context: None,
|
||||||
partial_result_params: Default::default(),
|
partial_result_params: Default::default(),
|
||||||
|
@ -1228,6 +1228,7 @@ impl ImportSelector {
|
|||||||
pub struct ImportStatement {
|
pub struct ImportStatement {
|
||||||
pub selector: ImportSelector,
|
pub selector: ImportSelector,
|
||||||
pub path: String,
|
pub path: String,
|
||||||
|
#[serde(default, skip_serializing_if = "ItemVisibility::is_default")]
|
||||||
pub visibility: ItemVisibility,
|
pub visibility: ItemVisibility,
|
||||||
|
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
@ -1517,6 +1517,11 @@ fn import_stmt(i: TokenSlice) -> PResult<BoxNode<ImportStatement>> {
|
|||||||
*a = Some(alias);
|
*a = Some(alias);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ParseContext::warn(CompilationError::err(
|
||||||
|
SourceRange::new(start, path.end, path.module_id),
|
||||||
|
"Importing a whole module is experimental, likely to be buggy, and likely to change",
|
||||||
|
));
|
||||||
|
|
||||||
if a.is_none()
|
if a.is_none()
|
||||||
&& (!path_string.ends_with(".kcl")
|
&& (!path_string.ends_with(".kcl")
|
||||||
|| path_string.starts_with("_")
|
|| path_string.starts_with("_")
|
||||||
@ -1717,11 +1722,10 @@ fn declaration(i: TokenSlice) -> PResult<BoxNode<VariableDeclaration>> {
|
|||||||
"an identifier, which becomes name you're binding the value to",
|
"an identifier, which becomes name you're binding the value to",
|
||||||
))
|
))
|
||||||
.parse_next(i)?;
|
.parse_next(i)?;
|
||||||
let (kind, mut start, dec_end, module_id) = if let Some((kind, token)) = &decl_token {
|
let (kind, mut start, dec_end) = if let Some((kind, token)) = &decl_token {
|
||||||
(*kind, token.start, token.end, token.module_id)
|
(*kind, token.start, token.end)
|
||||||
} else {
|
} else {
|
||||||
// TODO warn on const
|
(VariableKind::Const, id.start, id.end)
|
||||||
(VariableKind::Const, id.start, id.end, id.module_id)
|
|
||||||
};
|
};
|
||||||
if let Some(token) = visibility_token {
|
if let Some(token) = visibility_token {
|
||||||
start = token.start;
|
start = token.start;
|
||||||
@ -1743,7 +1747,7 @@ fn declaration(i: TokenSlice) -> PResult<BoxNode<VariableDeclaration>> {
|
|||||||
let ctxt_end = val.as_ref().map(|e| e.end()).unwrap_or(t.end);
|
let ctxt_end = val.as_ref().map(|e| e.end()).unwrap_or(t.end);
|
||||||
ParseContext::warn(CompilationError::with_suggestion(
|
ParseContext::warn(CompilationError::with_suggestion(
|
||||||
t.as_source_range(),
|
t.as_source_range(),
|
||||||
Some(SourceRange::new(id.start, ctxt_end, module_id)),
|
Some(SourceRange::new(id.start, ctxt_end, id.module_id)),
|
||||||
"Unnecessary `=` in function declaration",
|
"Unnecessary `=` in function declaration",
|
||||||
Some(("Remove `=`", "")),
|
Some(("Remove `=`", "")),
|
||||||
Tag::Unnecessary,
|
Tag::Unnecessary,
|
||||||
@ -1755,30 +1759,52 @@ fn declaration(i: TokenSlice) -> PResult<BoxNode<VariableDeclaration>> {
|
|||||||
equals(i)?;
|
equals(i)?;
|
||||||
ignore_whitespace(i);
|
ignore_whitespace(i);
|
||||||
|
|
||||||
expression
|
let val = expression
|
||||||
.try_map(|val| {
|
.try_map(|val| {
|
||||||
// Function bodies can be used if and only if declaring a function.
|
// Function bodies can be used if and only if declaring a function.
|
||||||
// Check the 'if' direction:
|
// Check the 'if' direction:
|
||||||
if matches!(val, Expr::FunctionExpression(_)) {
|
if matches!(val, Expr::FunctionExpression(_)) {
|
||||||
return Err(CompilationError::fatal(
|
return Err(CompilationError::fatal(
|
||||||
SourceRange::new(start, dec_end, module_id),
|
SourceRange::new(start, dec_end, id.module_id),
|
||||||
format!("Expected a `fn` variable kind, found: `{}`", kind),
|
format!("Expected a `fn` variable kind, found: `{}`", kind),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
Ok(val)
|
Ok(val)
|
||||||
})
|
})
|
||||||
.context(expected("a KCL value, which is being bound to a variable"))
|
.context(expected("a KCL value, which is being bound to a variable"))
|
||||||
.parse_next(i)
|
.parse_next(i);
|
||||||
|
|
||||||
|
if let Some((_, tok)) = decl_token {
|
||||||
|
ParseContext::warn(CompilationError::with_suggestion(
|
||||||
|
tok.as_source_range(),
|
||||||
|
Some(SourceRange::new(
|
||||||
|
id.start,
|
||||||
|
val.as_ref().map(|e| e.end()).unwrap_or(dec_end),
|
||||||
|
id.module_id,
|
||||||
|
)),
|
||||||
|
format!(
|
||||||
|
"Using `{}` to declare constants is deprecated; no keyword is required",
|
||||||
|
tok.value
|
||||||
|
),
|
||||||
|
Some((format!("Remove `{}`", tok.value), "")),
|
||||||
|
Tag::Deprecated,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
val
|
||||||
}
|
}
|
||||||
.map_err(|e| e.cut())?;
|
.map_err(|e| e.cut())?;
|
||||||
|
|
||||||
let end = val.end();
|
let end = val.end();
|
||||||
Ok(Box::new(Node {
|
Ok(Box::new(Node {
|
||||||
|
start,
|
||||||
|
end,
|
||||||
|
module_id: id.module_id,
|
||||||
inner: VariableDeclaration {
|
inner: VariableDeclaration {
|
||||||
declaration: Node {
|
declaration: Node {
|
||||||
start: id.start,
|
start: id.start,
|
||||||
end,
|
end,
|
||||||
module_id,
|
module_id: id.module_id,
|
||||||
inner: VariableDeclarator {
|
inner: VariableDeclarator {
|
||||||
id,
|
id,
|
||||||
init: val,
|
init: val,
|
||||||
@ -1789,9 +1815,6 @@ fn declaration(i: TokenSlice) -> PResult<BoxNode<VariableDeclaration>> {
|
|||||||
kind,
|
kind,
|
||||||
digest: None,
|
digest: None,
|
||||||
},
|
},
|
||||||
start,
|
|
||||||
end,
|
|
||||||
module_id,
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2593,9 +2616,9 @@ mod tests {
|
|||||||
fn test_comments_in_function1() {
|
fn test_comments_in_function1() {
|
||||||
let test_program = r#"() {
|
let test_program = r#"() {
|
||||||
// comment 0
|
// comment 0
|
||||||
const a = 1
|
a = 1
|
||||||
// comment 1
|
// comment 1
|
||||||
const b = 2
|
b = 2
|
||||||
// comment 2
|
// comment 2
|
||||||
return 1
|
return 1
|
||||||
}"#;
|
}"#;
|
||||||
@ -2614,7 +2637,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_comments_in_function2() {
|
fn test_comments_in_function2() {
|
||||||
let test_program = r#"() {
|
let test_program = r#"() {
|
||||||
const yo = { a = { b = { c = '123' } } } /* block
|
yo = { a = { b = { c = '123' } } } /* block
|
||||||
comment */
|
comment */
|
||||||
}"#;
|
}"#;
|
||||||
let tokens = crate::parsing::token::lexer(test_program, ModuleId::default()).unwrap();
|
let tokens = crate::parsing::token::lexer(test_program, ModuleId::default()).unwrap();
|
||||||
@ -2629,7 +2652,7 @@ comment */
|
|||||||
let test_program = r#"
|
let test_program = r#"
|
||||||
/* comment at start */
|
/* comment at start */
|
||||||
|
|
||||||
const mySk1 = startSketchAt([0, 0])"#;
|
mySk1 = startSketchAt([0, 0])"#;
|
||||||
let tokens = crate::parsing::token::lexer(test_program, ModuleId::default()).unwrap();
|
let tokens = crate::parsing::token::lexer(test_program, ModuleId::default()).unwrap();
|
||||||
let program = program.parse(&tokens).unwrap();
|
let program = program.parse(&tokens).unwrap();
|
||||||
let mut starting_comments = program.inner.non_code_meta.start_nodes;
|
let mut starting_comments = program.inner.non_code_meta.start_nodes;
|
||||||
@ -2648,7 +2671,7 @@ const mySk1 = startSketchAt([0, 0])"#;
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_comment_in_pipe() {
|
fn test_comment_in_pipe() {
|
||||||
let tokens = crate::parsing::token::lexer(r#"const x = y() |> /*hi*/ z(%)"#, ModuleId::default()).unwrap();
|
let tokens = crate::parsing::token::lexer(r#"x = y() |> /*hi*/ z(%)"#, ModuleId::default()).unwrap();
|
||||||
let mut body = program.parse(&tokens).unwrap().inner.body;
|
let mut body = program.parse(&tokens).unwrap().inner.body;
|
||||||
let BodyItem::VariableDeclaration(item) = body.remove(0) else {
|
let BodyItem::VariableDeclaration(item) = body.remove(0) else {
|
||||||
panic!("expected vardec");
|
panic!("expected vardec");
|
||||||
@ -2774,10 +2797,10 @@ const mySk1 = startSketchAt([0, 0])"#;
|
|||||||
#[test]
|
#[test]
|
||||||
fn many_comments() {
|
fn many_comments() {
|
||||||
let test_program = r#"// this is a comment
|
let test_program = r#"// this is a comment
|
||||||
const yo = { a = { b = { c = '123' } } } /* block
|
yo = { a = { b = { c = '123' } } } /* block
|
||||||
comment */
|
comment */
|
||||||
|
|
||||||
const key = 'c'
|
key = 'c'
|
||||||
// this is also a comment
|
// this is also a comment
|
||||||
return things
|
return things
|
||||||
"#;
|
"#;
|
||||||
@ -2811,8 +2834,8 @@ const mySk1 = startSketchAt([0, 0])"#;
|
|||||||
},
|
},
|
||||||
digest: None,
|
digest: None,
|
||||||
},
|
},
|
||||||
63,
|
57,
|
||||||
85,
|
79,
|
||||||
module_id,
|
module_id,
|
||||||
),
|
),
|
||||||
Node::new(
|
Node::new(
|
||||||
@ -2820,8 +2843,8 @@ const mySk1 = startSketchAt([0, 0])"#;
|
|||||||
value: NonCodeValue::NewLine,
|
value: NonCodeValue::NewLine,
|
||||||
digest: None,
|
digest: None,
|
||||||
},
|
},
|
||||||
85,
|
79,
|
||||||
89,
|
83,
|
||||||
module_id,
|
module_id,
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
@ -2837,8 +2860,8 @@ const mySk1 = startSketchAt([0, 0])"#;
|
|||||||
},
|
},
|
||||||
digest: None,
|
digest: None,
|
||||||
},
|
},
|
||||||
106,
|
94,
|
||||||
132,
|
120,
|
||||||
module_id,
|
module_id,
|
||||||
)]),
|
)]),
|
||||||
non_code_meta.non_code_nodes.get(&1),
|
non_code_meta.non_code_nodes.get(&1),
|
||||||
@ -2847,7 +2870,7 @@ const mySk1 = startSketchAt([0, 0])"#;
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn inline_block_comments() {
|
fn inline_block_comments() {
|
||||||
let test_program = r#"const yo = 3 /* block
|
let test_program = r#"yo = 3 /* block
|
||||||
comment */
|
comment */
|
||||||
return 1"#;
|
return 1"#;
|
||||||
|
|
||||||
@ -2912,10 +2935,10 @@ const mySk1 = startSketchAt([0, 0])"#;
|
|||||||
#[test]
|
#[test]
|
||||||
fn assign_brackets() {
|
fn assign_brackets() {
|
||||||
for (i, test_input) in [
|
for (i, test_input) in [
|
||||||
"const thickness_squared = (1 + 1)",
|
"thickness_squared = (1 + 1)",
|
||||||
"const thickness_squared = ( 1 + 1)",
|
"thickness_squared = ( 1 + 1)",
|
||||||
"const thickness_squared = (1 + 1 )",
|
"thickness_squared = (1 + 1 )",
|
||||||
"const thickness_squared = ( 1 + 1 )",
|
"thickness_squared = ( 1 + 1 )",
|
||||||
]
|
]
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
@ -2937,7 +2960,7 @@ const mySk1 = startSketchAt([0, 0])"#;
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_function_call() {
|
fn test_function_call() {
|
||||||
for (i, test_input) in ["const x = f(1)", "const x = f( 1 )"].into_iter().enumerate() {
|
for (i, test_input) in ["x = f(1)", "x = f( 1 )"].into_iter().enumerate() {
|
||||||
let tokens = crate::parsing::token::lexer(test_input, ModuleId::default()).unwrap();
|
let tokens = crate::parsing::token::lexer(test_input, ModuleId::default()).unwrap();
|
||||||
let _actual = match declaration.parse(&tokens) {
|
let _actual = match declaration.parse(&tokens) {
|
||||||
Err(e) => panic!("Could not parse test {i}: {e:#?}"),
|
Err(e) => panic!("Could not parse test {i}: {e:#?}"),
|
||||||
@ -3259,7 +3282,7 @@ const mySk1 = startSketchAt([0, 0])"#;
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_declaration() {
|
fn test_declaration() {
|
||||||
let tests = ["const myVar = 5", "const myVar=5", "const myVar =5", "const myVar= 5"];
|
let tests = ["myVar = 5", "myVar=5", "myVar =5", "myVar= 5"];
|
||||||
for test in tests {
|
for test in tests {
|
||||||
// Run the original parser
|
// Run the original parser
|
||||||
let tokens = crate::parsing::token::lexer(test, ModuleId::default()).unwrap();
|
let tokens = crate::parsing::token::lexer(test, ModuleId::default()).unwrap();
|
||||||
@ -3517,7 +3540,7 @@ const mySk1 = startSketchAt([0, 0])"#;
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_parse_half_pipe_small() {
|
fn test_parse_half_pipe_small() {
|
||||||
assert_err_contains(
|
assert_err_contains(
|
||||||
"const secondExtrude = startSketchOn('XY')
|
"secondExtrude = startSketchOn('XY')
|
||||||
|> startProfileAt([0,0], %)
|
|> startProfileAt([0,0], %)
|
||||||
|",
|
|",
|
||||||
"Unexpected token: |",
|
"Unexpected token: |",
|
||||||
@ -3526,20 +3549,20 @@ const mySk1 = startSketchAt([0, 0])"#;
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_member_expression_double_nested_braces() {
|
fn test_parse_member_expression_double_nested_braces() {
|
||||||
let code = r#"const prop = yo["one"][two]"#;
|
let code = r#"prop = yo["one"][two]"#;
|
||||||
crate::parsing::top_level_parse(code).unwrap();
|
crate::parsing::top_level_parse(code).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_member_expression_binary_expression_period_number_first() {
|
fn test_parse_member_expression_binary_expression_period_number_first() {
|
||||||
let code = r#"const obj = { a: 1, b: 2 }
|
let code = r#"obj = { a: 1, b: 2 }
|
||||||
const height = 1 - obj.a"#;
|
height = 1 - obj.a"#;
|
||||||
crate::parsing::top_level_parse(code).unwrap();
|
crate::parsing::top_level_parse(code).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_member_expression_allowed_type_in_expression() {
|
fn test_parse_member_expression_allowed_type_in_expression() {
|
||||||
let code = r#"const obj = { thing: 1 }
|
let code = r#"obj = { thing: 1 }
|
||||||
startSketchOn(obj.sketch)"#;
|
startSketchOn(obj.sketch)"#;
|
||||||
|
|
||||||
crate::parsing::top_level_parse(code).unwrap();
|
crate::parsing::top_level_parse(code).unwrap();
|
||||||
@ -3547,36 +3570,36 @@ startSketchOn(obj.sketch)"#;
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_member_expression_binary_expression_brace_number_first() {
|
fn test_parse_member_expression_binary_expression_brace_number_first() {
|
||||||
let code = r#"const obj = { a: 1, b: 2 }
|
let code = r#"obj = { a: 1, b: 2 }
|
||||||
const height = 1 - obj["a"]"#;
|
height = 1 - obj["a"]"#;
|
||||||
crate::parsing::top_level_parse(code).unwrap();
|
crate::parsing::top_level_parse(code).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_member_expression_binary_expression_brace_number_second() {
|
fn test_parse_member_expression_binary_expression_brace_number_second() {
|
||||||
let code = r#"const obj = { a: 1, b: 2 }
|
let code = r#"obj = { a: 1, b: 2 }
|
||||||
const height = obj["a"] - 1"#;
|
height = obj["a"] - 1"#;
|
||||||
crate::parsing::top_level_parse(code).unwrap();
|
crate::parsing::top_level_parse(code).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_member_expression_binary_expression_in_array_number_first() {
|
fn test_parse_member_expression_binary_expression_in_array_number_first() {
|
||||||
let code = r#"const obj = { a: 1, b: 2 }
|
let code = r#"obj = { a: 1, b: 2 }
|
||||||
const height = [1 - obj["a"], 0]"#;
|
height = [1 - obj["a"], 0]"#;
|
||||||
crate::parsing::top_level_parse(code).unwrap();
|
crate::parsing::top_level_parse(code).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_member_expression_binary_expression_in_array_number_second() {
|
fn test_parse_member_expression_binary_expression_in_array_number_second() {
|
||||||
let code = r#"const obj = { a: 1, b: 2 }
|
let code = r#"obj = { a: 1, b: 2 }
|
||||||
const height = [obj["a"] - 1, 0]"#;
|
height = [obj["a"] - 1, 0]"#;
|
||||||
crate::parsing::top_level_parse(code).unwrap();
|
crate::parsing::top_level_parse(code).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_member_expression_binary_expression_in_array_number_second_missing_space() {
|
fn test_parse_member_expression_binary_expression_in_array_number_second_missing_space() {
|
||||||
let code = r#"const obj = { a: 1, b: 2 }
|
let code = r#"obj = { a: 1, b: 2 }
|
||||||
const height = [obj["a"] -1, 0]"#;
|
height = [obj["a"] -1, 0]"#;
|
||||||
crate::parsing::top_level_parse(code).unwrap();
|
crate::parsing::top_level_parse(code).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3592,9 +3615,9 @@ const height = [obj["a"] -1, 0]"#;
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_half_pipe() {
|
fn test_parse_half_pipe() {
|
||||||
let code = "const height = 10
|
let code = "height = 10
|
||||||
|
|
||||||
const firstExtrude = startSketchOn('XY')
|
firstExtrude = startSketchOn('XY')
|
||||||
|> startProfileAt([0,0], %)
|
|> startProfileAt([0,0], %)
|
||||||
|> line([0, 8], %)
|
|> line([0, 8], %)
|
||||||
|> line([20, 0], %)
|
|> line([20, 0], %)
|
||||||
@ -3602,7 +3625,7 @@ const firstExtrude = startSketchOn('XY')
|
|||||||
|> close(%)
|
|> close(%)
|
||||||
|> extrude(2, %)
|
|> extrude(2, %)
|
||||||
|
|
||||||
const secondExtrude = startSketchOn('XY')
|
secondExtrude = startSketchOn('XY')
|
||||||
|> startProfileAt([0,0], %)
|
|> startProfileAt([0,0], %)
|
||||||
|";
|
|";
|
||||||
assert_err_contains(code, "Unexpected token: |");
|
assert_err_contains(code, "Unexpected token: |");
|
||||||
@ -3647,10 +3670,10 @@ const secondExtrude = startSketchOn('XY')
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_negative_in_array_binary_expression() {
|
fn test_parse_negative_in_array_binary_expression() {
|
||||||
let code = r#"const leg1 = 5
|
let code = r#"leg1 = 5
|
||||||
const thickness = 0.56
|
thickness = 0.56
|
||||||
|
|
||||||
const bracket = [-leg2 + thickness, 0]
|
bracket = [-leg2 + thickness, 0]
|
||||||
"#;
|
"#;
|
||||||
crate::parsing::top_level_parse(code).unwrap();
|
crate::parsing::top_level_parse(code).unwrap();
|
||||||
}
|
}
|
||||||
@ -3882,6 +3905,13 @@ e
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn warn_import() {
|
||||||
|
let some_program_string = r#"import "foo.kcl""#;
|
||||||
|
let (_, errs) = assert_no_err(some_program_string);
|
||||||
|
assert_eq!(errs.len(), 1);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn zero_param_function() {
|
fn zero_param_function() {
|
||||||
let code = r#"
|
let code = r#"
|
||||||
@ -4009,7 +4039,7 @@ thing(false)
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn random_words_fail() {
|
fn random_words_fail() {
|
||||||
let test_program = r#"const part001 = startSketchOn('-XZ')
|
let test_program = r#"part001 = startSketchOn('-XZ')
|
||||||
|> startProfileAt([8.53, 11.8], %)
|
|> startProfileAt([8.53, 11.8], %)
|
||||||
asdasd asdasd
|
asdasd asdasd
|
||||||
|> line([11.12, -14.82], %)
|
|> line([11.12, -14.82], %)
|
||||||
@ -4023,7 +4053,7 @@ thing(false)
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_member_expression_sketch() {
|
fn test_member_expression_sketch() {
|
||||||
let some_program_string = r#"fn cube = (pos, scale) => {
|
let some_program_string = r#"fn cube = (pos, scale) => {
|
||||||
const sg = startSketchOn('XY')
|
sg = startSketchOn('XY')
|
||||||
|> startProfileAt(pos, %)
|
|> startProfileAt(pos, %)
|
||||||
|> line([0, scale], %)
|
|> line([0, scale], %)
|
||||||
|> line([scale, 0], %)
|
|> line([scale, 0], %)
|
||||||
@ -4032,18 +4062,18 @@ thing(false)
|
|||||||
return sg
|
return sg
|
||||||
}
|
}
|
||||||
|
|
||||||
const b1 = cube([0,0], 10)
|
b1 = cube([0,0], 10)
|
||||||
const b2 = cube([3,3], 4)
|
b2 = cube([3,3], 4)
|
||||||
|
|
||||||
const pt1 = b1[0]
|
pt1 = b1[0]
|
||||||
const pt2 = b2[0]
|
pt2 = b2[0]
|
||||||
"#;
|
"#;
|
||||||
crate::parsing::top_level_parse(some_program_string).unwrap();
|
crate::parsing::top_level_parse(some_program_string).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_math_with_stdlib() {
|
fn test_math_with_stdlib() {
|
||||||
let some_program_string = r#"const d2r = pi() / 2
|
let some_program_string = r#"d2r = pi() / 2
|
||||||
let other_thing = 2 * cos(3)"#;
|
let other_thing = 2 * cos(3)"#;
|
||||||
crate::parsing::top_level_parse(some_program_string).unwrap();
|
crate::parsing::top_level_parse(some_program_string).unwrap();
|
||||||
}
|
}
|
||||||
@ -4051,7 +4081,7 @@ let other_thing = 2 * cos(3)"#;
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_negative_arguments() {
|
fn test_negative_arguments() {
|
||||||
let some_program_string = r#"fn box = (p, h, l, w) => {
|
let some_program_string = r#"fn box = (p, h, l, w) => {
|
||||||
const myBox = startSketchOn('XY')
|
myBox = startSketchOn('XY')
|
||||||
|> startProfileAt(p, %)
|
|> startProfileAt(p, %)
|
||||||
|> line([0, l], %)
|
|> line([0, l], %)
|
||||||
|> line([w, 0], %)
|
|> line([w, 0], %)
|
||||||
@ -4253,6 +4283,26 @@ int(42.3)"#;
|
|||||||
}"#
|
}"#
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn warn_const() {
|
||||||
|
let some_program_string = r#"const foo = 0
|
||||||
|
let bar = 1
|
||||||
|
var baz = 2
|
||||||
|
"#;
|
||||||
|
let (_, errs) = assert_no_err(some_program_string);
|
||||||
|
assert_eq!(errs.len(), 3);
|
||||||
|
let replaced = errs[2].apply_suggestion(some_program_string).unwrap();
|
||||||
|
let replaced = errs[1].apply_suggestion(&replaced).unwrap();
|
||||||
|
let replaced = errs[0].apply_suggestion(&replaced).unwrap();
|
||||||
|
assert_eq!(
|
||||||
|
replaced,
|
||||||
|
r#" foo = 0
|
||||||
|
bar = 1
|
||||||
|
baz = 2
|
||||||
|
"#
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
@ -4324,19 +4374,19 @@ mod snapshot_tests {
|
|||||||
|
|
||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
a,
|
a,
|
||||||
r#"const boxSketch = startSketchAt([0, 0])
|
r#"boxSketch = startSketchAt([0, 0])
|
||||||
|> line([0, 10], %)
|
|> line([0, 10], %)
|
||||||
|> tangentialArc([-5, 5], %)
|
|> tangentialArc([-5, 5], %)
|
||||||
|> line([5, -15], %)
|
|> line([5, -15], %)
|
||||||
|> extrude(10, %)
|
|> extrude(10, %)
|
||||||
"#
|
"#
|
||||||
);
|
);
|
||||||
snapshot_test!(b, "const myVar = min(5 , -legLen(5, 4))"); // Space before comma
|
snapshot_test!(b, "myVar = min(5 , -legLen(5, 4))"); // Space before comma
|
||||||
|
|
||||||
snapshot_test!(c, "const myVar = min(-legLen(5, 4), 5)");
|
snapshot_test!(c, "myVar = min(-legLen(5, 4), 5)");
|
||||||
snapshot_test!(d, "const myVar = 5 + 6 |> myFunc(45, %)");
|
snapshot_test!(d, "myVar = 5 + 6 |> myFunc(45, %)");
|
||||||
snapshot_test!(e, "let x = 1 * (3 - 4)");
|
snapshot_test!(e, "let x = 1 * (3 - 4)");
|
||||||
snapshot_test!(f, r#"const x = 1 // this is an inline comment"#);
|
snapshot_test!(f, r#"x = 1 // this is an inline comment"#);
|
||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
g,
|
g,
|
||||||
r#"fn x = () => {
|
r#"fn x = () => {
|
||||||
@ -4344,57 +4394,57 @@ mod snapshot_tests {
|
|||||||
return sg
|
return sg
|
||||||
}"#
|
}"#
|
||||||
);
|
);
|
||||||
snapshot_test!(d2, r#"const x = -leg2 + thickness"#);
|
snapshot_test!(d2, r#"x = -leg2 + thickness"#);
|
||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
h,
|
h,
|
||||||
r#"const obj = { a: 1, b: 2 }
|
r#"obj = { a: 1, b: 2 }
|
||||||
const height = 1 - obj.a"#
|
height = 1 - obj.a"#
|
||||||
);
|
);
|
||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
i,
|
i,
|
||||||
r#"const obj = { a: 1, b: 2 }
|
r#"obj = { a: 1, b: 2 }
|
||||||
const height = 1 - obj["a"]"#
|
height = 1 - obj["a"]"#
|
||||||
);
|
);
|
||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
j,
|
j,
|
||||||
r#"const obj = { a: 1, b: 2 }
|
r#"obj = { a: 1, b: 2 }
|
||||||
const height = obj["a"] - 1"#
|
height = obj["a"] - 1"#
|
||||||
);
|
);
|
||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
k,
|
k,
|
||||||
r#"const obj = { a: 1, b: 2 }
|
r#"obj = { a: 1, b: 2 }
|
||||||
const height = [1 - obj["a"], 0]"#
|
height = [1 - obj["a"], 0]"#
|
||||||
);
|
);
|
||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
l,
|
l,
|
||||||
r#"const obj = { a: 1, b: 2 }
|
r#"obj = { a: 1, b: 2 }
|
||||||
const height = [obj["a"] - 1, 0]"#
|
height = [obj["a"] - 1, 0]"#
|
||||||
);
|
);
|
||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
m,
|
m,
|
||||||
r#"const obj = { a: 1, b: 2 }
|
r#"obj = { a: 1, b: 2 }
|
||||||
const height = [obj["a"] -1, 0]"#
|
height = [obj["a"] -1, 0]"#
|
||||||
);
|
);
|
||||||
snapshot_test!(n, "const height = 1 - obj.a");
|
snapshot_test!(n, "height = 1 - obj.a");
|
||||||
snapshot_test!(o, "const six = 1 + 2 + 3");
|
snapshot_test!(o, "six = 1 + 2 + 3");
|
||||||
snapshot_test!(p, "const five = 3 * 1 + 2");
|
snapshot_test!(p, "five = 3 * 1 + 2");
|
||||||
snapshot_test!(q, r#"const height = [ obj["a"], 0 ]"#);
|
snapshot_test!(q, r#"height = [ obj["a"], 0 ]"#);
|
||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
r,
|
r,
|
||||||
r#"const obj = { a: 1, b: 2 }
|
r#"obj = { a: 1, b: 2 }
|
||||||
const height = obj["a"]"#
|
height = obj["a"]"#
|
||||||
);
|
);
|
||||||
snapshot_test!(s, r#"const prop = yo["one"][two]"#);
|
snapshot_test!(s, r#"prop = yo["one"][two]"#);
|
||||||
snapshot_test!(t, r#"const pt1 = b1[x]"#);
|
snapshot_test!(t, r#"pt1 = b1[x]"#);
|
||||||
snapshot_test!(u, "const prop = yo.one.two.three.four");
|
snapshot_test!(u, "prop = yo.one.two.three.four");
|
||||||
snapshot_test!(v, r#"const pt1 = b1[0]"#);
|
snapshot_test!(v, r#"pt1 = b1[0]"#);
|
||||||
snapshot_test!(w, r#"const pt1 = b1['zero']"#);
|
snapshot_test!(w, r#"pt1 = b1['zero']"#);
|
||||||
snapshot_test!(x, r#"const pt1 = b1.zero"#);
|
snapshot_test!(x, r#"pt1 = b1.zero"#);
|
||||||
snapshot_test!(y, "const sg = startSketchAt(pos)");
|
snapshot_test!(y, "sg = startSketchAt(pos)");
|
||||||
snapshot_test!(z, "const sg = startSketchAt(pos) |> line([0, -scale], %)");
|
snapshot_test!(z, "sg = startSketchAt(pos) |> line([0, -scale], %)");
|
||||||
snapshot_test!(aa, r#"const sg = -scale"#);
|
snapshot_test!(aa, r#"sg = -scale"#);
|
||||||
snapshot_test!(ab, "lineTo({ to: [0, -1] })");
|
snapshot_test!(ab, "lineTo({ to: [0, -1] })");
|
||||||
snapshot_test!(ac, "const myArray = [0..10]");
|
snapshot_test!(ac, "myArray = [0..10]");
|
||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
ad,
|
ad,
|
||||||
r#"
|
r#"
|
||||||
@ -4412,25 +4462,22 @@ mod snapshot_tests {
|
|||||||
);
|
);
|
||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
af,
|
af,
|
||||||
r#"const mySketch = startSketchAt([0,0])
|
r#"mySketch = startSketchAt([0,0])
|
||||||
|> lineTo([0, 1], %, $myPath)
|
|> lineTo([0, 1], %, $myPath)
|
||||||
|> lineTo([1, 1], %)
|
|> lineTo([1, 1], %)
|
||||||
|> lineTo([1, 0], %, $rightPath)
|
|> lineTo([1, 0], %, $rightPath)
|
||||||
|> close(%)"#
|
|> close(%)"#
|
||||||
);
|
);
|
||||||
snapshot_test!(
|
snapshot_test!(ag, "mySketch = startSketchAt([0,0]) |> lineTo([1, 1], %) |> close(%)");
|
||||||
ag,
|
snapshot_test!(ah, "myBox = startSketchAt(p)");
|
||||||
"const mySketch = startSketchAt([0,0]) |> lineTo([1, 1], %) |> close(%)"
|
snapshot_test!(ai, r#"myBox = f(1) |> g(2, %)"#);
|
||||||
);
|
snapshot_test!(aj, r#"myBox = startSketchAt(p) |> line([0, l], %)"#);
|
||||||
snapshot_test!(ah, "const myBox = startSketchAt(p)");
|
|
||||||
snapshot_test!(ai, r#"const myBox = f(1) |> g(2, %)"#);
|
|
||||||
snapshot_test!(aj, r#"const myBox = startSketchAt(p) |> line([0, l], %)"#);
|
|
||||||
snapshot_test!(ak, "lineTo({ to: [0, 1] })");
|
snapshot_test!(ak, "lineTo({ to: [0, 1] })");
|
||||||
snapshot_test!(al, "lineTo({ to: [0, 1], from: [3, 3] })");
|
snapshot_test!(al, "lineTo({ to: [0, 1], from: [3, 3] })");
|
||||||
snapshot_test!(am, "lineTo({to:[0, 1]})");
|
snapshot_test!(am, "lineTo({to:[0, 1]})");
|
||||||
snapshot_test!(an, "lineTo({ to: [0, 1], from: [3, 3]})");
|
snapshot_test!(an, "lineTo({ to: [0, 1], from: [3, 3]})");
|
||||||
snapshot_test!(ao, "lineTo({ to: [0, 1],from: [3, 3] })");
|
snapshot_test!(ao, "lineTo({ to: [0, 1],from: [3, 3] })");
|
||||||
snapshot_test!(ap, "const mySketch = startSketchAt([0,0])");
|
snapshot_test!(ap, "mySketch = startSketchAt([0,0])");
|
||||||
snapshot_test!(aq, "log(5, \"hello\", aIdentifier)");
|
snapshot_test!(aq, "log(5, \"hello\", aIdentifier)");
|
||||||
snapshot_test!(ar, r#"5 + "a""#);
|
snapshot_test!(ar, r#"5 + "a""#);
|
||||||
snapshot_test!(at, "line([0, l], %)");
|
snapshot_test!(at, "line([0, l], %)");
|
||||||
@ -4473,7 +4520,7 @@ mod snapshot_tests {
|
|||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
ba,
|
ba,
|
||||||
r#"
|
r#"
|
||||||
const sketch001 = startSketchOn('XY')
|
sketch001 = startSketchOn('XY')
|
||||||
// |> arc({
|
// |> arc({
|
||||||
// angleEnd: 270,
|
// angleEnd: 270,
|
||||||
// angleStart: 450,
|
// angleStart: 450,
|
||||||
@ -4484,12 +4531,12 @@ const sketch001 = startSketchOn('XY')
|
|||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
bb,
|
bb,
|
||||||
r#"
|
r#"
|
||||||
const my14 = 4 ^ 2 - 3 ^ 2 * 2
|
my14 = 4 ^ 2 - 3 ^ 2 * 2
|
||||||
"#
|
"#
|
||||||
);
|
);
|
||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
bc,
|
bc,
|
||||||
r#"const x = if true {
|
r#"x = if true {
|
||||||
3
|
3
|
||||||
} else {
|
} else {
|
||||||
4
|
4
|
||||||
@ -4497,7 +4544,7 @@ const my14 = 4 ^ 2 - 3 ^ 2 * 2
|
|||||||
);
|
);
|
||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
bd,
|
bd,
|
||||||
r#"const x = if true {
|
r#"x = if true {
|
||||||
3
|
3
|
||||||
} else if func(radius) {
|
} else if func(radius) {
|
||||||
4
|
4
|
||||||
@ -4508,7 +4555,7 @@ const my14 = 4 ^ 2 - 3 ^ 2 * 2
|
|||||||
snapshot_test!(be, "let x = 3 == 3");
|
snapshot_test!(be, "let x = 3 == 3");
|
||||||
snapshot_test!(bf, "let x = 3 != 3");
|
snapshot_test!(bf, "let x = 3 != 3");
|
||||||
snapshot_test!(bg, r#"x = 4"#);
|
snapshot_test!(bg, r#"x = 4"#);
|
||||||
snapshot_test!(bh, "const obj = {center : [10, 10], radius: 5}");
|
snapshot_test!(bh, "obj = {center : [10, 10], radius: 5}");
|
||||||
snapshot_test!(
|
snapshot_test!(
|
||||||
bi,
|
bi,
|
||||||
r#"x = 3
|
r#"x = 3
|
||||||
|
@ -6,11 +6,11 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 143,
|
"end": 137,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 15,
|
"end": 9,
|
||||||
"name": "boxSketch",
|
"name": "boxSketch",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
@ -20,36 +20,36 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 34,
|
"end": 28,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 33,
|
"start": 27,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 37,
|
"end": 31,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 36,
|
"start": 30,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 38,
|
"end": 32,
|
||||||
"start": 32,
|
"start": 26,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 31,
|
"end": 25,
|
||||||
"name": "startSketchAt",
|
"name": "startSketchAt",
|
||||||
"start": 18,
|
"start": 12,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 39,
|
"end": 33,
|
||||||
"start": 18,
|
"start": 12,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
@ -58,42 +58,42 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 54,
|
"end": 48,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 53,
|
"start": 47,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 58,
|
"end": 52,
|
||||||
"raw": "10",
|
"raw": "10",
|
||||||
"start": 56,
|
"start": 50,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 10.0
|
"value": 10.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 59,
|
"end": 53,
|
||||||
"start": 52,
|
"start": 46,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 62,
|
"end": 56,
|
||||||
"start": 61,
|
"start": 55,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 51,
|
"end": 45,
|
||||||
"name": "line",
|
"name": "line",
|
||||||
"start": 47,
|
"start": 41,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 63,
|
"end": 57,
|
||||||
"start": 47,
|
"start": 41,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
@ -103,48 +103,48 @@ expression: actual
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"argument": {
|
"argument": {
|
||||||
"end": 88,
|
"end": 82,
|
||||||
"raw": "5",
|
"raw": "5",
|
||||||
"start": 87,
|
"start": 81,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 5.0
|
"value": 5.0
|
||||||
},
|
},
|
||||||
"end": 88,
|
"end": 82,
|
||||||
"operator": "-",
|
"operator": "-",
|
||||||
"start": 86,
|
"start": 80,
|
||||||
"type": "UnaryExpression",
|
"type": "UnaryExpression",
|
||||||
"type": "UnaryExpression"
|
"type": "UnaryExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 91,
|
"end": 85,
|
||||||
"raw": "5",
|
"raw": "5",
|
||||||
"start": 90,
|
"start": 84,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 5.0
|
"value": 5.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 92,
|
"end": 86,
|
||||||
"start": 85,
|
"start": 79,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 95,
|
"end": 89,
|
||||||
"start": 94,
|
"start": 88,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 84,
|
"end": 78,
|
||||||
"name": "tangentialArc",
|
"name": "tangentialArc",
|
||||||
"start": 71,
|
"start": 65,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 96,
|
"end": 90,
|
||||||
"start": 71,
|
"start": 65,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
@ -153,96 +153,96 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 111,
|
"end": 105,
|
||||||
"raw": "5",
|
"raw": "5",
|
||||||
"start": 110,
|
"start": 104,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 5.0
|
"value": 5.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"argument": {
|
"argument": {
|
||||||
"end": 116,
|
"end": 110,
|
||||||
"raw": "15",
|
"raw": "15",
|
||||||
"start": 114,
|
"start": 108,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 15.0
|
"value": 15.0
|
||||||
},
|
},
|
||||||
"end": 116,
|
"end": 110,
|
||||||
"operator": "-",
|
"operator": "-",
|
||||||
"start": 113,
|
"start": 107,
|
||||||
"type": "UnaryExpression",
|
"type": "UnaryExpression",
|
||||||
"type": "UnaryExpression"
|
"type": "UnaryExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 117,
|
"end": 111,
|
||||||
"start": 109,
|
"start": 103,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 120,
|
"end": 114,
|
||||||
"start": 119,
|
"start": 113,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 108,
|
"end": 102,
|
||||||
"name": "line",
|
"name": "line",
|
||||||
"start": 104,
|
"start": 98,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 121,
|
"end": 115,
|
||||||
"start": 104,
|
"start": 98,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 139,
|
"end": 133,
|
||||||
"raw": "10",
|
"raw": "10",
|
||||||
"start": 137,
|
"start": 131,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 10.0
|
"value": 10.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 142,
|
"end": 136,
|
||||||
"start": 141,
|
"start": 135,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 136,
|
"end": 130,
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"start": 129,
|
"start": 123,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 143,
|
"end": 137,
|
||||||
"start": 129,
|
"start": 123,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 143,
|
"end": 137,
|
||||||
"start": 18,
|
"start": 12,
|
||||||
"type": "PipeExpression",
|
"type": "PipeExpression",
|
||||||
"type": "PipeExpression"
|
"type": "PipeExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 143,
|
"end": 137,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 144,
|
"end": 138,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,37 +6,37 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 8,
|
"end": 2,
|
||||||
"name": "sg",
|
"name": "sg",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"argument": {
|
"argument": {
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"name": "scale",
|
"name": "scale",
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"operator": "-",
|
"operator": "-",
|
||||||
"start": 11,
|
"start": 5,
|
||||||
"type": "UnaryExpression",
|
"type": "UnaryExpression",
|
||||||
"type": "UnaryExpression"
|
"type": "UnaryExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,29 +6,29 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 23,
|
"end": 17,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 13,
|
"end": 7,
|
||||||
"name": "myArray",
|
"name": "myArray",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 23,
|
"end": 17,
|
||||||
"endElement": {
|
"endElement": {
|
||||||
"end": 22,
|
"end": 16,
|
||||||
"raw": "10",
|
"raw": "10",
|
||||||
"start": 20,
|
"start": 14,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 10.0
|
"value": 10.0
|
||||||
},
|
},
|
||||||
"endInclusive": true,
|
"endInclusive": true,
|
||||||
"start": 16,
|
"start": 10,
|
||||||
"startElement": {
|
"startElement": {
|
||||||
"end": 18,
|
"end": 12,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 17,
|
"start": 11,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
@ -36,16 +36,16 @@ expression: actual
|
|||||||
"type": "ArrayRangeExpression",
|
"type": "ArrayRangeExpression",
|
||||||
"type": "ArrayRangeExpression"
|
"type": "ArrayRangeExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 23,
|
"end": 17,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 23,
|
"end": 17,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,11 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 165,
|
"end": 159,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 14,
|
"end": 8,
|
||||||
"name": "mySketch",
|
"name": "mySketch",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
@ -20,36 +20,36 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 33,
|
"end": 27,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 32,
|
"start": 26,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 35,
|
"end": 29,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 34,
|
"start": 28,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 36,
|
"end": 30,
|
||||||
"start": 31,
|
"start": 25,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"name": "startSketchAt",
|
"name": "startSketchAt",
|
||||||
"start": 17,
|
"start": 11,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 37,
|
"end": 31,
|
||||||
"start": 17,
|
"start": 11,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
@ -58,49 +58,49 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 58,
|
"end": 52,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 57,
|
"start": 51,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 61,
|
"end": 55,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 60,
|
"start": 54,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 62,
|
"end": 56,
|
||||||
"start": 56,
|
"start": 50,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 65,
|
"end": 59,
|
||||||
"start": 64,
|
"start": 58,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 74,
|
"end": 68,
|
||||||
"start": 67,
|
"start": 61,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "myPath"
|
"value": "myPath"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 55,
|
"end": 49,
|
||||||
"name": "lineTo",
|
"name": "lineTo",
|
||||||
"start": 49,
|
"start": 43,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 75,
|
"end": 69,
|
||||||
"start": 49,
|
"start": 43,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
@ -109,42 +109,42 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 96,
|
"end": 90,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 95,
|
"start": 89,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 99,
|
"end": 93,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 98,
|
"start": 92,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 100,
|
"end": 94,
|
||||||
"start": 94,
|
"start": 88,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 103,
|
"end": 97,
|
||||||
"start": 102,
|
"start": 96,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 93,
|
"end": 87,
|
||||||
"name": "lineTo",
|
"name": "lineTo",
|
||||||
"start": 87,
|
"start": 81,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 104,
|
"end": 98,
|
||||||
"start": 87,
|
"start": 81,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
@ -153,88 +153,88 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 125,
|
"end": 119,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 124,
|
"start": 118,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 128,
|
"end": 122,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 127,
|
"start": 121,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 129,
|
"end": 123,
|
||||||
"start": 123,
|
"start": 117,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 132,
|
"end": 126,
|
||||||
"start": 131,
|
"start": 125,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 144,
|
"end": 138,
|
||||||
"start": 134,
|
"start": 128,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "rightPath"
|
"value": "rightPath"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 122,
|
"end": 116,
|
||||||
"name": "lineTo",
|
"name": "lineTo",
|
||||||
"start": 116,
|
"start": 110,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 145,
|
"end": 139,
|
||||||
"start": 116,
|
"start": 110,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 164,
|
"end": 158,
|
||||||
"start": 163,
|
"start": 157,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 162,
|
"end": 156,
|
||||||
"name": "close",
|
"name": "close",
|
||||||
"start": 157,
|
"start": 151,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 165,
|
"end": 159,
|
||||||
"start": 157,
|
"start": 151,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 165,
|
"end": 159,
|
||||||
"start": 17,
|
"start": 11,
|
||||||
"type": "PipeExpression",
|
"type": "PipeExpression",
|
||||||
"type": "PipeExpression"
|
"type": "PipeExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 165,
|
"end": 159,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 165,
|
"end": 159,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,11 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 70,
|
"end": 64,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 14,
|
"end": 8,
|
||||||
"name": "mySketch",
|
"name": "mySketch",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
@ -20,36 +20,36 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 33,
|
"end": 27,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 32,
|
"start": 26,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 35,
|
"end": 29,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 34,
|
"start": 28,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 36,
|
"end": 30,
|
||||||
"start": 31,
|
"start": 25,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"name": "startSketchAt",
|
"name": "startSketchAt",
|
||||||
"start": 17,
|
"start": 11,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 37,
|
"end": 31,
|
||||||
"start": 17,
|
"start": 11,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
@ -58,81 +58,81 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 50,
|
"end": 44,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 49,
|
"start": 43,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 53,
|
"end": 47,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 52,
|
"start": 46,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 54,
|
"end": 48,
|
||||||
"start": 48,
|
"start": 42,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 57,
|
"end": 51,
|
||||||
"start": 56,
|
"start": 50,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 47,
|
"end": 41,
|
||||||
"name": "lineTo",
|
"name": "lineTo",
|
||||||
"start": 41,
|
"start": 35,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 58,
|
"end": 52,
|
||||||
"start": 41,
|
"start": 35,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 69,
|
"end": 63,
|
||||||
"start": 68,
|
"start": 62,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 67,
|
"end": 61,
|
||||||
"name": "close",
|
"name": "close",
|
||||||
"start": 62,
|
"start": 56,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 70,
|
"end": 64,
|
||||||
"start": 62,
|
"start": 56,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 70,
|
"end": 64,
|
||||||
"start": 17,
|
"start": 11,
|
||||||
"type": "PipeExpression",
|
"type": "PipeExpression",
|
||||||
"type": "PipeExpression"
|
"type": "PipeExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 70,
|
"end": 64,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 70,
|
"end": 64,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,44 +6,44 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 11,
|
"end": 5,
|
||||||
"name": "myBox",
|
"name": "myBox",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"name": "p",
|
"name": "p",
|
||||||
"start": 28,
|
"start": 22,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 27,
|
"end": 21,
|
||||||
"name": "startSketchAt",
|
"name": "startSketchAt",
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,11 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 11,
|
"end": 5,
|
||||||
"name": "myBox",
|
"name": "myBox",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
@ -18,69 +18,69 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 16,
|
"start": 10,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 15,
|
"end": 9,
|
||||||
"name": "f",
|
"name": "f",
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 18,
|
"end": 12,
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 25,
|
"end": 19,
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 24,
|
"start": 18,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 2.0
|
"value": 2.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 28,
|
"end": 22,
|
||||||
"start": 27,
|
"start": 21,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 23,
|
"end": 17,
|
||||||
"name": "g",
|
"name": "g",
|
||||||
"start": 22,
|
"start": 16,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"start": 22,
|
"start": 16,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "PipeExpression",
|
"type": "PipeExpression",
|
||||||
"type": "PipeExpression"
|
"type": "PipeExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,11 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 49,
|
"end": 43,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 11,
|
"end": 5,
|
||||||
"name": "myBox",
|
"name": "myBox",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
@ -18,21 +18,21 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"name": "p",
|
"name": "p",
|
||||||
"start": 28,
|
"start": 22,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 27,
|
"end": 21,
|
||||||
"name": "startSketchAt",
|
"name": "startSketchAt",
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
@ -41,60 +41,60 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 41,
|
"end": 35,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 40,
|
"start": 34,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 44,
|
"end": 38,
|
||||||
"name": "l",
|
"name": "l",
|
||||||
"start": 43,
|
"start": 37,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 45,
|
"end": 39,
|
||||||
"start": 39,
|
"start": 33,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 48,
|
"end": 42,
|
||||||
"start": 47,
|
"start": 41,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 38,
|
"end": 32,
|
||||||
"name": "line",
|
"name": "line",
|
||||||
"start": 34,
|
"start": 28,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 49,
|
"end": 43,
|
||||||
"start": 34,
|
"start": 28,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 49,
|
"end": 43,
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "PipeExpression",
|
"type": "PipeExpression",
|
||||||
"type": "PipeExpression"
|
"type": "PipeExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 49,
|
"end": 43,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 49,
|
"end": 43,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,11 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 37,
|
"end": 31,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 14,
|
"end": 8,
|
||||||
"name": "mySketch",
|
"name": "mySketch",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
@ -18,49 +18,49 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 33,
|
"end": 27,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 32,
|
"start": 26,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 35,
|
"end": 29,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 34,
|
"start": 28,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 36,
|
"end": 30,
|
||||||
"start": 31,
|
"start": 25,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"name": "startSketchAt",
|
"name": "startSketchAt",
|
||||||
"start": 17,
|
"start": 11,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 37,
|
"end": 31,
|
||||||
"start": 17,
|
"start": 11,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 37,
|
"end": 31,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 37,
|
"end": 31,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,19 +6,19 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 36,
|
"end": 30,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 11,
|
"end": 5,
|
||||||
"name": "myVar",
|
"name": "myVar",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 19,
|
"end": 13,
|
||||||
"raw": "5",
|
"raw": "5",
|
||||||
"start": 18,
|
"start": 12,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 5.0
|
"value": 5.0
|
||||||
@ -27,61 +27,61 @@ expression: actual
|
|||||||
"argument": {
|
"argument": {
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 31,
|
"end": 25,
|
||||||
"raw": "5",
|
"raw": "5",
|
||||||
"start": 30,
|
"start": 24,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 5.0
|
"value": 5.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 34,
|
"end": 28,
|
||||||
"raw": "4",
|
"raw": "4",
|
||||||
"start": 33,
|
"start": 27,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 4.0
|
"value": 4.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"name": "legLen",
|
"name": "legLen",
|
||||||
"start": 23,
|
"start": 17,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 35,
|
"end": 29,
|
||||||
"start": 23,
|
"start": 17,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
"end": 35,
|
"end": 29,
|
||||||
"operator": "-",
|
"operator": "-",
|
||||||
"start": 22,
|
"start": 16,
|
||||||
"type": "UnaryExpression",
|
"type": "UnaryExpression",
|
||||||
"type": "UnaryExpression"
|
"type": "UnaryExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"name": "min",
|
"name": "min",
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 36,
|
"end": 30,
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 36,
|
"end": 30,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 36,
|
"end": 30,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,11 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 132,
|
"end": 126,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 16,
|
"end": 10,
|
||||||
"name": "sketch001",
|
"name": "sketch001",
|
||||||
"start": 7,
|
"start": 1,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
@ -18,53 +18,53 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 37,
|
"end": 31,
|
||||||
"raw": "'XY'",
|
"raw": "'XY'",
|
||||||
"start": 33,
|
"start": 27,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": "XY"
|
"value": "XY"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 32,
|
"end": 26,
|
||||||
"name": "startSketchOn",
|
"name": "startSketchOn",
|
||||||
"start": 19,
|
"start": 13,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 38,
|
"end": 32,
|
||||||
"start": 19,
|
"start": 13,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 131,
|
"end": 125,
|
||||||
"start": 130,
|
"start": 124,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 129,
|
"end": 123,
|
||||||
"name": "startProfileAt",
|
"name": "startProfileAt",
|
||||||
"start": 115,
|
"start": 109,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 132,
|
"end": 126,
|
||||||
"start": 115,
|
"start": 109,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 132,
|
"end": 126,
|
||||||
"nonCodeMeta": {
|
"nonCodeMeta": {
|
||||||
"nonCodeNodes": {
|
"nonCodeNodes": {
|
||||||
"0": [
|
"0": [
|
||||||
{
|
{
|
||||||
"end": 52,
|
"end": 46,
|
||||||
"start": 41,
|
"start": 35,
|
||||||
"type": "NonCodeNode",
|
"type": "NonCodeNode",
|
||||||
"value": {
|
"value": {
|
||||||
"type": "blockComment",
|
"type": "blockComment",
|
||||||
@ -73,8 +73,8 @@ expression: actual
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 74,
|
"end": 68,
|
||||||
"start": 55,
|
"start": 49,
|
||||||
"type": "NonCodeNode",
|
"type": "NonCodeNode",
|
||||||
"value": {
|
"value": {
|
||||||
"type": "blockComment",
|
"type": "blockComment",
|
||||||
@ -83,8 +83,8 @@ expression: actual
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 98,
|
"end": 92,
|
||||||
"start": 77,
|
"start": 71,
|
||||||
"type": "NonCodeNode",
|
"type": "NonCodeNode",
|
||||||
"value": {
|
"value": {
|
||||||
"type": "blockComment",
|
"type": "blockComment",
|
||||||
@ -93,8 +93,8 @@ expression: actual
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 109,
|
"end": 103,
|
||||||
"start": 101,
|
"start": 95,
|
||||||
"type": "NonCodeNode",
|
"type": "NonCodeNode",
|
||||||
"value": {
|
"value": {
|
||||||
"type": "blockComment",
|
"type": "blockComment",
|
||||||
@ -106,20 +106,20 @@ expression: actual
|
|||||||
},
|
},
|
||||||
"startNodes": []
|
"startNodes": []
|
||||||
},
|
},
|
||||||
"start": 19,
|
"start": 13,
|
||||||
"type": "PipeExpression",
|
"type": "PipeExpression",
|
||||||
"type": "PipeExpression"
|
"type": "PipeExpression"
|
||||||
},
|
},
|
||||||
"start": 7,
|
"start": 1,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 132,
|
"end": 126,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 1,
|
"start": 1,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 133,
|
"end": 127,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,91 +6,91 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 31,
|
"end": 25,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 11,
|
"end": 5,
|
||||||
"name": "my14",
|
"name": "my14",
|
||||||
"start": 7,
|
"start": 1,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 31,
|
"end": 25,
|
||||||
"left": {
|
"left": {
|
||||||
"end": 19,
|
"end": 13,
|
||||||
"left": {
|
"left": {
|
||||||
"end": 15,
|
"end": 9,
|
||||||
"raw": "4",
|
"raw": "4",
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 4.0
|
"value": 4.0
|
||||||
},
|
},
|
||||||
"operator": "^",
|
"operator": "^",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 19,
|
"end": 13,
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 18,
|
"start": 12,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 2.0
|
"value": 2.0
|
||||||
},
|
},
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
"operator": "-",
|
"operator": "-",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 31,
|
"end": 25,
|
||||||
"left": {
|
"left": {
|
||||||
"end": 27,
|
"end": 21,
|
||||||
"left": {
|
"left": {
|
||||||
"end": 23,
|
"end": 17,
|
||||||
"raw": "3",
|
"raw": "3",
|
||||||
"start": 22,
|
"start": 16,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 3.0
|
"value": 3.0
|
||||||
},
|
},
|
||||||
"operator": "^",
|
"operator": "^",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 27,
|
"end": 21,
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 26,
|
"start": 20,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 2.0
|
"value": 2.0
|
||||||
},
|
},
|
||||||
"start": 22,
|
"start": 16,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
"operator": "*",
|
"operator": "*",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 31,
|
"end": 25,
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 30,
|
"start": 24,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 2.0
|
"value": 2.0
|
||||||
},
|
},
|
||||||
"start": 22,
|
"start": 16,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
"start": 7,
|
"start": 1,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 31,
|
"end": 25,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 1,
|
"start": 1,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 32,
|
"end": 26,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,79 +6,79 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 74,
|
"end": 68,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 7,
|
"end": 1,
|
||||||
"name": "x",
|
"name": "x",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"cond": {
|
"cond": {
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"raw": "true",
|
"raw": "true",
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": true
|
"value": true
|
||||||
},
|
},
|
||||||
"digest": null,
|
"digest": null,
|
||||||
"else_ifs": [],
|
"else_ifs": [],
|
||||||
"end": 74,
|
"end": 68,
|
||||||
"final_else": {
|
"final_else": {
|
||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"end": 64,
|
"end": 58,
|
||||||
"expression": {
|
"expression": {
|
||||||
"end": 64,
|
"end": 58,
|
||||||
"raw": "4",
|
"raw": "4",
|
||||||
"start": 63,
|
"start": 57,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 4.0
|
"value": 4.0
|
||||||
},
|
},
|
||||||
"start": 63,
|
"start": 57,
|
||||||
"type": "ExpressionStatement",
|
"type": "ExpressionStatement",
|
||||||
"type": "ExpressionStatement"
|
"type": "ExpressionStatement"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 73,
|
"end": 67,
|
||||||
"start": 63
|
"start": 57
|
||||||
},
|
},
|
||||||
"start": 10,
|
"start": 4,
|
||||||
"then_val": {
|
"then_val": {
|
||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"end": 33,
|
"end": 27,
|
||||||
"expression": {
|
"expression": {
|
||||||
"end": 33,
|
"end": 27,
|
||||||
"raw": "3",
|
"raw": "3",
|
||||||
"start": 32,
|
"start": 26,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 3.0
|
"value": 3.0
|
||||||
},
|
},
|
||||||
"start": 32,
|
"start": 26,
|
||||||
"type": "ExpressionStatement",
|
"type": "ExpressionStatement",
|
||||||
"type": "ExpressionStatement"
|
"type": "ExpressionStatement"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 42,
|
"end": 36,
|
||||||
"start": 32
|
"start": 26
|
||||||
},
|
},
|
||||||
"type": "IfExpression",
|
"type": "IfExpression",
|
||||||
"type": "IfExpression"
|
"type": "IfExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 74,
|
"end": 68,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 74,
|
"end": 68,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,18 +6,18 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 121,
|
"end": 115,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 7,
|
"end": 1,
|
||||||
"name": "x",
|
"name": "x",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"cond": {
|
"cond": {
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"raw": "true",
|
"raw": "true",
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": true
|
"value": true
|
||||||
@ -28,105 +28,105 @@ expression: actual
|
|||||||
"cond": {
|
"cond": {
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 63,
|
"end": 57,
|
||||||
"name": "radius",
|
"name": "radius",
|
||||||
"start": 57,
|
"start": 51,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 56,
|
"end": 50,
|
||||||
"name": "func",
|
"name": "func",
|
||||||
"start": 52,
|
"start": 46,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 64,
|
"end": 58,
|
||||||
"start": 52,
|
"start": 46,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
"digest": null,
|
"digest": null,
|
||||||
"end": 90,
|
"end": 84,
|
||||||
"start": 44,
|
"start": 38,
|
||||||
"then_val": {
|
"then_val": {
|
||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"end": 80,
|
"end": 74,
|
||||||
"expression": {
|
"expression": {
|
||||||
"end": 80,
|
"end": 74,
|
||||||
"raw": "4",
|
"raw": "4",
|
||||||
"start": 79,
|
"start": 73,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 4.0
|
"value": 4.0
|
||||||
},
|
},
|
||||||
"start": 79,
|
"start": 73,
|
||||||
"type": "ExpressionStatement",
|
"type": "ExpressionStatement",
|
||||||
"type": "ExpressionStatement"
|
"type": "ExpressionStatement"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 89,
|
"end": 83,
|
||||||
"start": 65
|
"start": 59
|
||||||
},
|
},
|
||||||
"type": "ElseIf"
|
"type": "ElseIf"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 121,
|
"end": 115,
|
||||||
"final_else": {
|
"final_else": {
|
||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"end": 111,
|
"end": 105,
|
||||||
"expression": {
|
"expression": {
|
||||||
"end": 111,
|
"end": 105,
|
||||||
"raw": "5",
|
"raw": "5",
|
||||||
"start": 110,
|
"start": 104,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 5.0
|
"value": 5.0
|
||||||
},
|
},
|
||||||
"start": 110,
|
"start": 104,
|
||||||
"type": "ExpressionStatement",
|
"type": "ExpressionStatement",
|
||||||
"type": "ExpressionStatement"
|
"type": "ExpressionStatement"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 120,
|
"end": 114,
|
||||||
"start": 110
|
"start": 104
|
||||||
},
|
},
|
||||||
"start": 10,
|
"start": 4,
|
||||||
"then_val": {
|
"then_val": {
|
||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"end": 33,
|
"end": 27,
|
||||||
"expression": {
|
"expression": {
|
||||||
"end": 33,
|
"end": 27,
|
||||||
"raw": "3",
|
"raw": "3",
|
||||||
"start": 32,
|
"start": 26,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 3.0
|
"value": 3.0
|
||||||
},
|
},
|
||||||
"start": 32,
|
"start": 26,
|
||||||
"type": "ExpressionStatement",
|
"type": "ExpressionStatement",
|
||||||
"type": "ExpressionStatement"
|
"type": "ExpressionStatement"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 42,
|
"end": 36,
|
||||||
"start": 32
|
"start": 26
|
||||||
},
|
},
|
||||||
"type": "IfExpression",
|
"type": "IfExpression",
|
||||||
"type": "IfExpression"
|
"type": "IfExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 121,
|
"end": 115,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 121,
|
"end": 115,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,85 +6,85 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 42,
|
"end": 36,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 9,
|
"end": 3,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 42,
|
"end": 36,
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"key": {
|
"key": {
|
||||||
"end": 19,
|
"end": 13,
|
||||||
"name": "center",
|
"name": "center",
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "ObjectProperty",
|
"type": "ObjectProperty",
|
||||||
"value": {
|
"value": {
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 25,
|
"end": 19,
|
||||||
"raw": "10",
|
"raw": "10",
|
||||||
"start": 23,
|
"start": 17,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 10.0
|
"value": 10.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"raw": "10",
|
"raw": "10",
|
||||||
"start": 27,
|
"start": 21,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 10.0
|
"value": 10.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"start": 22,
|
"start": 16,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 41,
|
"end": 35,
|
||||||
"key": {
|
"key": {
|
||||||
"end": 38,
|
"end": 32,
|
||||||
"name": "radius",
|
"name": "radius",
|
||||||
"start": 32,
|
"start": 26,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 32,
|
"start": 26,
|
||||||
"type": "ObjectProperty",
|
"type": "ObjectProperty",
|
||||||
"value": {
|
"value": {
|
||||||
"end": 41,
|
"end": 35,
|
||||||
"raw": "5",
|
"raw": "5",
|
||||||
"start": 40,
|
"start": 34,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 5.0
|
"value": 5.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "ObjectExpression",
|
"type": "ObjectExpression",
|
||||||
"type": "ObjectExpression"
|
"type": "ObjectExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 42,
|
"end": 36,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 42,
|
"end": 36,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,11 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 35,
|
"end": 29,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 11,
|
"end": 5,
|
||||||
"name": "myVar",
|
"name": "myVar",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
@ -19,69 +19,69 @@ expression: actual
|
|||||||
"argument": {
|
"argument": {
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 27,
|
"end": 21,
|
||||||
"raw": "5",
|
"raw": "5",
|
||||||
"start": 26,
|
"start": 20,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 5.0
|
"value": 5.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"raw": "4",
|
"raw": "4",
|
||||||
"start": 29,
|
"start": 23,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 4.0
|
"value": 4.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 25,
|
"end": 19,
|
||||||
"name": "legLen",
|
"name": "legLen",
|
||||||
"start": 19,
|
"start": 13,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 31,
|
"end": 25,
|
||||||
"start": 19,
|
"start": 13,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
"end": 31,
|
"end": 25,
|
||||||
"operator": "-",
|
"operator": "-",
|
||||||
"start": 18,
|
"start": 12,
|
||||||
"type": "UnaryExpression",
|
"type": "UnaryExpression",
|
||||||
"type": "UnaryExpression"
|
"type": "UnaryExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 34,
|
"end": 28,
|
||||||
"raw": "5",
|
"raw": "5",
|
||||||
"start": 33,
|
"start": 27,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 5.0
|
"value": 5.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"name": "min",
|
"name": "min",
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 35,
|
"end": 29,
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 35,
|
"end": 29,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 35,
|
"end": 29,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,82 +6,82 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 36,
|
"end": 30,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 11,
|
"end": 5,
|
||||||
"name": "myVar",
|
"name": "myVar",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"end": 19,
|
"end": 13,
|
||||||
"left": {
|
"left": {
|
||||||
"end": 15,
|
"end": 9,
|
||||||
"raw": "5",
|
"raw": "5",
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 5.0
|
"value": 5.0
|
||||||
},
|
},
|
||||||
"operator": "+",
|
"operator": "+",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 19,
|
"end": 13,
|
||||||
"raw": "6",
|
"raw": "6",
|
||||||
"start": 18,
|
"start": 12,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 6.0
|
"value": 6.0
|
||||||
},
|
},
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 32,
|
"end": 26,
|
||||||
"raw": "45",
|
"raw": "45",
|
||||||
"start": 30,
|
"start": 24,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 45.0
|
"value": 45.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 35,
|
"end": 29,
|
||||||
"start": 34,
|
"start": 28,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"name": "myFunc",
|
"name": "myFunc",
|
||||||
"start": 23,
|
"start": 17,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 36,
|
"end": 30,
|
||||||
"start": 23,
|
"start": 17,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 36,
|
"end": 30,
|
||||||
"start": 14,
|
"start": 8,
|
||||||
"type": "PipeExpression",
|
"type": "PipeExpression",
|
||||||
"type": "PipeExpression"
|
"type": "PipeExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 36,
|
"end": 30,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 36,
|
"end": 30,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,51 +6,51 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 27,
|
"end": 21,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 7,
|
"end": 1,
|
||||||
"name": "x",
|
"name": "x",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 27,
|
"end": 21,
|
||||||
"left": {
|
"left": {
|
||||||
"argument": {
|
"argument": {
|
||||||
"end": 15,
|
"end": 9,
|
||||||
"name": "leg2",
|
"name": "leg2",
|
||||||
"start": 11,
|
"start": 5,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 15,
|
"end": 9,
|
||||||
"operator": "-",
|
"operator": "-",
|
||||||
"start": 10,
|
"start": 4,
|
||||||
"type": "UnaryExpression",
|
"type": "UnaryExpression",
|
||||||
"type": "UnaryExpression"
|
"type": "UnaryExpression"
|
||||||
},
|
},
|
||||||
"operator": "+",
|
"operator": "+",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 27,
|
"end": 21,
|
||||||
"name": "thickness",
|
"name": "thickness",
|
||||||
"start": 18,
|
"start": 12,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 10,
|
"start": 4,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 27,
|
"end": 21,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 27,
|
"end": 21,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,38 +6,38 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 11,
|
"end": 5,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 7,
|
"end": 1,
|
||||||
"name": "x",
|
"name": "x",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 11,
|
"end": 5,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 10,
|
"start": 4,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 11,
|
"end": 5,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 40,
|
"end": 34,
|
||||||
"nonCodeMeta": {
|
"nonCodeMeta": {
|
||||||
"nonCodeNodes": {
|
"nonCodeNodes": {
|
||||||
"0": [
|
"0": [
|
||||||
{
|
{
|
||||||
"end": 40,
|
"end": 34,
|
||||||
"start": 11,
|
"start": 5,
|
||||||
"type": "NonCodeNode",
|
"type": "NonCodeNode",
|
||||||
"value": {
|
"value": {
|
||||||
"type": "inlineComment",
|
"type": "inlineComment",
|
||||||
|
@ -6,21 +6,40 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 9,
|
"end": 3,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"properties": [
|
"properties": [
|
||||||
|
{
|
||||||
|
"end": 12,
|
||||||
|
"key": {
|
||||||
|
"end": 9,
|
||||||
|
"name": "a",
|
||||||
|
"start": 8,
|
||||||
|
"type": "Identifier"
|
||||||
|
},
|
||||||
|
"start": 8,
|
||||||
|
"type": "ObjectProperty",
|
||||||
|
"value": {
|
||||||
|
"end": 12,
|
||||||
|
"raw": "1",
|
||||||
|
"start": 11,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": 1.0
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"end": 18,
|
"end": 18,
|
||||||
"key": {
|
"key": {
|
||||||
"end": 15,
|
"end": 15,
|
||||||
"name": "a",
|
"name": "b",
|
||||||
"start": 14,
|
"start": 14,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
@ -28,41 +47,22 @@ expression: actual
|
|||||||
"type": "ObjectProperty",
|
"type": "ObjectProperty",
|
||||||
"value": {
|
"value": {
|
||||||
"end": 18,
|
"end": 18,
|
||||||
"raw": "1",
|
|
||||||
"start": 17,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": 1.0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 24,
|
|
||||||
"key": {
|
|
||||||
"end": 21,
|
|
||||||
"name": "b",
|
|
||||||
"start": 20,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
|
||||||
"start": 20,
|
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"end": 24,
|
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 23,
|
"start": 17,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 2.0
|
"value": 2.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "ObjectExpression",
|
"type": "ObjectExpression",
|
||||||
"type": "ObjectExpression"
|
"type": "ObjectExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
@ -70,19 +70,19 @@ expression: actual
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 55,
|
"end": 43,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 43,
|
"end": 31,
|
||||||
"name": "height",
|
"name": "height",
|
||||||
"start": 37,
|
"start": 25,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 55,
|
"end": 43,
|
||||||
"left": {
|
"left": {
|
||||||
"end": 47,
|
"end": 35,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 46,
|
"start": 34,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
@ -90,39 +90,39 @@ expression: actual
|
|||||||
"operator": "-",
|
"operator": "-",
|
||||||
"right": {
|
"right": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 55,
|
"end": 43,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 53,
|
"end": 41,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 50,
|
"start": 38,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 55,
|
"end": 43,
|
||||||
"name": "a",
|
"name": "a",
|
||||||
"start": 54,
|
"start": 42,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 50,
|
"start": 38,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"start": 46,
|
"start": 34,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
"start": 37,
|
"start": 25,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 55,
|
"end": 43,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 31,
|
"start": 25,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 55,
|
"end": 43,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,21 +6,40 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 9,
|
"end": 3,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"properties": [
|
"properties": [
|
||||||
|
{
|
||||||
|
"end": 12,
|
||||||
|
"key": {
|
||||||
|
"end": 9,
|
||||||
|
"name": "a",
|
||||||
|
"start": 8,
|
||||||
|
"type": "Identifier"
|
||||||
|
},
|
||||||
|
"start": 8,
|
||||||
|
"type": "ObjectProperty",
|
||||||
|
"value": {
|
||||||
|
"end": 12,
|
||||||
|
"raw": "1",
|
||||||
|
"start": 11,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": 1.0
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"end": 18,
|
"end": 18,
|
||||||
"key": {
|
"key": {
|
||||||
"end": 15,
|
"end": 15,
|
||||||
"name": "a",
|
"name": "b",
|
||||||
"start": 14,
|
"start": 14,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
@ -28,41 +47,22 @@ expression: actual
|
|||||||
"type": "ObjectProperty",
|
"type": "ObjectProperty",
|
||||||
"value": {
|
"value": {
|
||||||
"end": 18,
|
"end": 18,
|
||||||
"raw": "1",
|
|
||||||
"start": 17,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": 1.0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 24,
|
|
||||||
"key": {
|
|
||||||
"end": 21,
|
|
||||||
"name": "b",
|
|
||||||
"start": 20,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
|
||||||
"start": 20,
|
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"end": 24,
|
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 23,
|
"start": 17,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 2.0
|
"value": 2.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "ObjectExpression",
|
"type": "ObjectExpression",
|
||||||
"type": "ObjectExpression"
|
"type": "ObjectExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
@ -70,19 +70,19 @@ expression: actual
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 59,
|
"end": 47,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 44,
|
"end": 32,
|
||||||
"name": "height",
|
"name": "height",
|
||||||
"start": 38,
|
"start": 26,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 59,
|
"end": 47,
|
||||||
"left": {
|
"left": {
|
||||||
"end": 48,
|
"end": 36,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 47,
|
"start": 35,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
@ -90,40 +90,40 @@ expression: actual
|
|||||||
"operator": "-",
|
"operator": "-",
|
||||||
"right": {
|
"right": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 59,
|
"end": 47,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 54,
|
"end": 42,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 51,
|
"start": 39,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 58,
|
"end": 46,
|
||||||
"raw": "\"a\"",
|
"raw": "\"a\"",
|
||||||
"start": 55,
|
"start": 43,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": "a"
|
"value": "a"
|
||||||
},
|
},
|
||||||
"start": 51,
|
"start": 39,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"start": 47,
|
"start": 35,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
"start": 38,
|
"start": 26,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 59,
|
"end": 47,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 32,
|
"start": 26,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 59,
|
"end": 47,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,21 +6,40 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 9,
|
"end": 3,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"properties": [
|
"properties": [
|
||||||
|
{
|
||||||
|
"end": 12,
|
||||||
|
"key": {
|
||||||
|
"end": 9,
|
||||||
|
"name": "a",
|
||||||
|
"start": 8,
|
||||||
|
"type": "Identifier"
|
||||||
|
},
|
||||||
|
"start": 8,
|
||||||
|
"type": "ObjectProperty",
|
||||||
|
"value": {
|
||||||
|
"end": 12,
|
||||||
|
"raw": "1",
|
||||||
|
"start": 11,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": 1.0
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"end": 18,
|
"end": 18,
|
||||||
"key": {
|
"key": {
|
||||||
"end": 15,
|
"end": 15,
|
||||||
"name": "a",
|
"name": "b",
|
||||||
"start": 14,
|
"start": 14,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
@ -28,41 +47,22 @@ expression: actual
|
|||||||
"type": "ObjectProperty",
|
"type": "ObjectProperty",
|
||||||
"value": {
|
"value": {
|
||||||
"end": 18,
|
"end": 18,
|
||||||
"raw": "1",
|
|
||||||
"start": 17,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": 1.0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 24,
|
|
||||||
"key": {
|
|
||||||
"end": 21,
|
|
||||||
"name": "b",
|
|
||||||
"start": 20,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
|
||||||
"start": 20,
|
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"end": 24,
|
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 23,
|
"start": 17,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 2.0
|
"value": 2.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "ObjectExpression",
|
"type": "ObjectExpression",
|
||||||
"type": "ObjectExpression"
|
"type": "ObjectExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
@ -70,60 +70,60 @@ expression: actual
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 58,
|
"end": 46,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 43,
|
"end": 31,
|
||||||
"name": "height",
|
"name": "height",
|
||||||
"start": 37,
|
"start": 25,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 58,
|
"end": 46,
|
||||||
"left": {
|
"left": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 54,
|
"end": 42,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 49,
|
"end": 37,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 46,
|
"start": 34,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 53,
|
"end": 41,
|
||||||
"raw": "\"a\"",
|
"raw": "\"a\"",
|
||||||
"start": 50,
|
"start": 38,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": "a"
|
"value": "a"
|
||||||
},
|
},
|
||||||
"start": 46,
|
"start": 34,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"operator": "-",
|
"operator": "-",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 58,
|
"end": 46,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 57,
|
"start": 45,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
},
|
},
|
||||||
"start": 46,
|
"start": 34,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
"start": 37,
|
"start": 25,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 58,
|
"end": 46,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 31,
|
"start": 25,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 58,
|
"end": 46,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,21 +6,40 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 9,
|
"end": 3,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"properties": [
|
"properties": [
|
||||||
|
{
|
||||||
|
"end": 12,
|
||||||
|
"key": {
|
||||||
|
"end": 9,
|
||||||
|
"name": "a",
|
||||||
|
"start": 8,
|
||||||
|
"type": "Identifier"
|
||||||
|
},
|
||||||
|
"start": 8,
|
||||||
|
"type": "ObjectProperty",
|
||||||
|
"value": {
|
||||||
|
"end": 12,
|
||||||
|
"raw": "1",
|
||||||
|
"start": 11,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": 1.0
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"end": 18,
|
"end": 18,
|
||||||
"key": {
|
"key": {
|
||||||
"end": 15,
|
"end": 15,
|
||||||
"name": "a",
|
"name": "b",
|
||||||
"start": 14,
|
"start": 14,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
@ -28,41 +47,22 @@ expression: actual
|
|||||||
"type": "ObjectProperty",
|
"type": "ObjectProperty",
|
||||||
"value": {
|
"value": {
|
||||||
"end": 18,
|
"end": 18,
|
||||||
"raw": "1",
|
|
||||||
"start": 17,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": 1.0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 24,
|
|
||||||
"key": {
|
|
||||||
"end": 21,
|
|
||||||
"name": "b",
|
|
||||||
"start": 20,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
|
||||||
"start": 20,
|
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"end": 24,
|
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 23,
|
"start": 17,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 2.0
|
"value": 2.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "ObjectExpression",
|
"type": "ObjectExpression",
|
||||||
"type": "ObjectExpression"
|
"type": "ObjectExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
@ -70,21 +70,21 @@ expression: actual
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 63,
|
"end": 51,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 43,
|
"end": 31,
|
||||||
"name": "height",
|
"name": "height",
|
||||||
"start": 37,
|
"start": 25,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 59,
|
"end": 47,
|
||||||
"left": {
|
"left": {
|
||||||
"end": 48,
|
"end": 36,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 47,
|
"start": 35,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
@ -92,54 +92,54 @@ expression: actual
|
|||||||
"operator": "-",
|
"operator": "-",
|
||||||
"right": {
|
"right": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 59,
|
"end": 47,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 54,
|
"end": 42,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 51,
|
"start": 39,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 58,
|
"end": 46,
|
||||||
"raw": "\"a\"",
|
"raw": "\"a\"",
|
||||||
"start": 55,
|
"start": 43,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": "a"
|
"value": "a"
|
||||||
},
|
},
|
||||||
"start": 51,
|
"start": 39,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"start": 47,
|
"start": 35,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 62,
|
"end": 50,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 61,
|
"start": 49,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 63,
|
"end": 51,
|
||||||
"start": 46,
|
"start": 34,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
},
|
},
|
||||||
"start": 37,
|
"start": 25,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 63,
|
"end": 51,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 31,
|
"start": 25,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 63,
|
"end": 51,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,21 +6,40 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 9,
|
"end": 3,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"properties": [
|
"properties": [
|
||||||
|
{
|
||||||
|
"end": 12,
|
||||||
|
"key": {
|
||||||
|
"end": 9,
|
||||||
|
"name": "a",
|
||||||
|
"start": 8,
|
||||||
|
"type": "Identifier"
|
||||||
|
},
|
||||||
|
"start": 8,
|
||||||
|
"type": "ObjectProperty",
|
||||||
|
"value": {
|
||||||
|
"end": 12,
|
||||||
|
"raw": "1",
|
||||||
|
"start": 11,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": 1.0
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"end": 18,
|
"end": 18,
|
||||||
"key": {
|
"key": {
|
||||||
"end": 15,
|
"end": 15,
|
||||||
"name": "a",
|
"name": "b",
|
||||||
"start": 14,
|
"start": 14,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
@ -28,41 +47,22 @@ expression: actual
|
|||||||
"type": "ObjectProperty",
|
"type": "ObjectProperty",
|
||||||
"value": {
|
"value": {
|
||||||
"end": 18,
|
"end": 18,
|
||||||
"raw": "1",
|
|
||||||
"start": 17,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": 1.0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 24,
|
|
||||||
"key": {
|
|
||||||
"end": 21,
|
|
||||||
"name": "b",
|
|
||||||
"start": 20,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
|
||||||
"start": 20,
|
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"end": 24,
|
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 23,
|
"start": 17,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 2.0
|
"value": 2.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "ObjectExpression",
|
"type": "ObjectExpression",
|
||||||
"type": "ObjectExpression"
|
"type": "ObjectExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
@ -70,76 +70,76 @@ expression: actual
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 63,
|
"end": 51,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 43,
|
"end": 31,
|
||||||
"name": "height",
|
"name": "height",
|
||||||
"start": 37,
|
"start": 25,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 59,
|
"end": 47,
|
||||||
"left": {
|
"left": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 55,
|
"end": 43,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 50,
|
"end": 38,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 47,
|
"start": 35,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 54,
|
"end": 42,
|
||||||
"raw": "\"a\"",
|
"raw": "\"a\"",
|
||||||
"start": 51,
|
"start": 39,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": "a"
|
"value": "a"
|
||||||
},
|
},
|
||||||
"start": 47,
|
"start": 35,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"operator": "-",
|
"operator": "-",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 59,
|
"end": 47,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 58,
|
"start": 46,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
},
|
},
|
||||||
"start": 47,
|
"start": 35,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 62,
|
"end": 50,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 61,
|
"start": 49,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 63,
|
"end": 51,
|
||||||
"start": 46,
|
"start": 34,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
},
|
},
|
||||||
"start": 37,
|
"start": 25,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 63,
|
"end": 51,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 31,
|
"start": 25,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 63,
|
"end": 51,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,21 +6,40 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 9,
|
"end": 3,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"properties": [
|
"properties": [
|
||||||
|
{
|
||||||
|
"end": 12,
|
||||||
|
"key": {
|
||||||
|
"end": 9,
|
||||||
|
"name": "a",
|
||||||
|
"start": 8,
|
||||||
|
"type": "Identifier"
|
||||||
|
},
|
||||||
|
"start": 8,
|
||||||
|
"type": "ObjectProperty",
|
||||||
|
"value": {
|
||||||
|
"end": 12,
|
||||||
|
"raw": "1",
|
||||||
|
"start": 11,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": 1.0
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"end": 18,
|
"end": 18,
|
||||||
"key": {
|
"key": {
|
||||||
"end": 15,
|
"end": 15,
|
||||||
"name": "a",
|
"name": "b",
|
||||||
"start": 14,
|
"start": 14,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
@ -28,41 +47,22 @@ expression: actual
|
|||||||
"type": "ObjectProperty",
|
"type": "ObjectProperty",
|
||||||
"value": {
|
"value": {
|
||||||
"end": 18,
|
"end": 18,
|
||||||
"raw": "1",
|
|
||||||
"start": 17,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": 1.0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 24,
|
|
||||||
"key": {
|
|
||||||
"end": 21,
|
|
||||||
"name": "b",
|
|
||||||
"start": 20,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
|
||||||
"start": 20,
|
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"end": 24,
|
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 23,
|
"start": 17,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 2.0
|
"value": 2.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "ObjectExpression",
|
"type": "ObjectExpression",
|
||||||
"type": "ObjectExpression"
|
"type": "ObjectExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
@ -70,76 +70,76 @@ expression: actual
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 62,
|
"end": 50,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 43,
|
"end": 31,
|
||||||
"name": "height",
|
"name": "height",
|
||||||
"start": 37,
|
"start": 25,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 58,
|
"end": 46,
|
||||||
"left": {
|
"left": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 55,
|
"end": 43,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 50,
|
"end": 38,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 47,
|
"start": 35,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 54,
|
"end": 42,
|
||||||
"raw": "\"a\"",
|
"raw": "\"a\"",
|
||||||
"start": 51,
|
"start": 39,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": "a"
|
"value": "a"
|
||||||
},
|
},
|
||||||
"start": 47,
|
"start": 35,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"operator": "-",
|
"operator": "-",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 58,
|
"end": 46,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 57,
|
"start": 45,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
},
|
},
|
||||||
"start": 47,
|
"start": 35,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 61,
|
"end": 49,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 60,
|
"start": 48,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 62,
|
"end": 50,
|
||||||
"start": 46,
|
"start": 34,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
},
|
},
|
||||||
"start": 37,
|
"start": 25,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 62,
|
"end": 50,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 31,
|
"start": 25,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 62,
|
"end": 50,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,19 +6,19 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 24,
|
"end": 18,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 12,
|
"end": 6,
|
||||||
"name": "height",
|
"name": "height",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 24,
|
"end": 18,
|
||||||
"left": {
|
"left": {
|
||||||
"end": 16,
|
"end": 10,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 15,
|
"start": 9,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
@ -26,39 +26,39 @@ expression: actual
|
|||||||
"operator": "-",
|
"operator": "-",
|
||||||
"right": {
|
"right": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 24,
|
"end": 18,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 22,
|
"end": 16,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 19,
|
"start": 13,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 24,
|
"end": 18,
|
||||||
"name": "a",
|
"name": "a",
|
||||||
"start": 23,
|
"start": 17,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 19,
|
"start": 13,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"start": 15,
|
"start": 9,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 24,
|
"end": 18,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 24,
|
"end": 18,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,61 +6,61 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 21,
|
"end": 15,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 9,
|
"end": 3,
|
||||||
"name": "six",
|
"name": "six",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 21,
|
"end": 15,
|
||||||
"left": {
|
"left": {
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"left": {
|
"left": {
|
||||||
"end": 13,
|
"end": 7,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
},
|
},
|
||||||
"operator": "+",
|
"operator": "+",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 16,
|
"start": 10,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 2.0
|
"value": 2.0
|
||||||
},
|
},
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
"operator": "+",
|
"operator": "+",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 21,
|
"end": 15,
|
||||||
"raw": "3",
|
"raw": "3",
|
||||||
"start": 20,
|
"start": 14,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 3.0
|
"value": 3.0
|
||||||
},
|
},
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 21,
|
"end": 15,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 21,
|
"end": 15,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,61 +6,61 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 22,
|
"end": 16,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 10,
|
"end": 4,
|
||||||
"name": "five",
|
"name": "five",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 22,
|
"end": 16,
|
||||||
"left": {
|
"left": {
|
||||||
"end": 18,
|
"end": 12,
|
||||||
"left": {
|
"left": {
|
||||||
"end": 14,
|
"end": 8,
|
||||||
"raw": "3",
|
"raw": "3",
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 3.0
|
"value": 3.0
|
||||||
},
|
},
|
||||||
"operator": "*",
|
"operator": "*",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 18,
|
"end": 12,
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 17,
|
"start": 11,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 1.0
|
"value": 1.0
|
||||||
},
|
},
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
"operator": "+",
|
"operator": "+",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 22,
|
"end": 16,
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 21,
|
"start": 15,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 2.0
|
"value": 2.0
|
||||||
},
|
},
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 22,
|
"end": 16,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 22,
|
"end": 16,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,61 +6,61 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 12,
|
"end": 6,
|
||||||
"name": "height",
|
"name": "height",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 25,
|
"end": 19,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 20,
|
"end": 14,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 17,
|
"start": 11,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 24,
|
"end": 18,
|
||||||
"raw": "\"a\"",
|
"raw": "\"a\"",
|
||||||
"start": 21,
|
"start": 15,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": "a"
|
"value": "a"
|
||||||
},
|
},
|
||||||
"start": 17,
|
"start": 11,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 28,
|
"end": 22,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 27,
|
"start": 21,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"start": 15,
|
"start": 9,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 30,
|
"end": 24,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,21 +6,40 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 9,
|
"end": 3,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"properties": [
|
"properties": [
|
||||||
|
{
|
||||||
|
"end": 12,
|
||||||
|
"key": {
|
||||||
|
"end": 9,
|
||||||
|
"name": "a",
|
||||||
|
"start": 8,
|
||||||
|
"type": "Identifier"
|
||||||
|
},
|
||||||
|
"start": 8,
|
||||||
|
"type": "ObjectProperty",
|
||||||
|
"value": {
|
||||||
|
"end": 12,
|
||||||
|
"raw": "1",
|
||||||
|
"start": 11,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": 1.0
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"end": 18,
|
"end": 18,
|
||||||
"key": {
|
"key": {
|
||||||
"end": 15,
|
"end": 15,
|
||||||
"name": "a",
|
"name": "b",
|
||||||
"start": 14,
|
"start": 14,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
@ -28,41 +47,22 @@ expression: actual
|
|||||||
"type": "ObjectProperty",
|
"type": "ObjectProperty",
|
||||||
"value": {
|
"value": {
|
||||||
"end": 18,
|
"end": 18,
|
||||||
"raw": "1",
|
|
||||||
"start": 17,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": 1.0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 24,
|
|
||||||
"key": {
|
|
||||||
"end": 21,
|
|
||||||
"name": "b",
|
|
||||||
"start": 20,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
|
||||||
"start": 20,
|
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"end": 24,
|
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 23,
|
"start": 17,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 2.0
|
"value": 2.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "ObjectExpression",
|
"type": "ObjectExpression",
|
||||||
"type": "ObjectExpression"
|
"type": "ObjectExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
@ -70,45 +70,45 @@ expression: actual
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 54,
|
"end": 42,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 43,
|
"end": 31,
|
||||||
"name": "height",
|
"name": "height",
|
||||||
"start": 37,
|
"start": 25,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 54,
|
"end": 42,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 49,
|
"end": 37,
|
||||||
"name": "obj",
|
"name": "obj",
|
||||||
"start": 46,
|
"start": 34,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 53,
|
"end": 41,
|
||||||
"raw": "\"a\"",
|
"raw": "\"a\"",
|
||||||
"start": 50,
|
"start": 38,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": "a"
|
"value": "a"
|
||||||
},
|
},
|
||||||
"start": 46,
|
"start": 34,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"start": 37,
|
"start": 25,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 54,
|
"end": 42,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 31,
|
"start": 25,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 54,
|
"end": 42,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,59 +6,59 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 27,
|
"end": 21,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 10,
|
"end": 4,
|
||||||
"name": "prop",
|
"name": "prop",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"computed": true,
|
"computed": true,
|
||||||
"end": 27,
|
"end": 21,
|
||||||
"object": {
|
"object": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 22,
|
"end": 16,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 15,
|
"end": 9,
|
||||||
"name": "yo",
|
"name": "yo",
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 21,
|
"end": 15,
|
||||||
"raw": "\"one\"",
|
"raw": "\"one\"",
|
||||||
"start": 16,
|
"start": 10,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": "one"
|
"value": "one"
|
||||||
},
|
},
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 26,
|
"end": 20,
|
||||||
"name": "two",
|
"name": "two",
|
||||||
"start": 23,
|
"start": 17,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 27,
|
"end": 21,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 27,
|
"end": 21,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,44 +6,44 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 9,
|
"end": 3,
|
||||||
"name": "pt1",
|
"name": "pt1",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"computed": true,
|
"computed": true,
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 14,
|
"end": 8,
|
||||||
"name": "b1",
|
"name": "b1",
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 16,
|
"end": 10,
|
||||||
"name": "x",
|
"name": "x",
|
||||||
"start": 15,
|
"start": 9,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,86 +6,86 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 34,
|
"end": 28,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 10,
|
"end": 4,
|
||||||
"name": "prop",
|
"name": "prop",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 34,
|
"end": 28,
|
||||||
"object": {
|
"object": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"object": {
|
"object": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 23,
|
"end": 17,
|
||||||
"object": {
|
"object": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 19,
|
"end": 13,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 15,
|
"end": 9,
|
||||||
"name": "yo",
|
"name": "yo",
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 19,
|
"end": 13,
|
||||||
"name": "one",
|
"name": "one",
|
||||||
"start": 16,
|
"start": 10,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 23,
|
"end": 17,
|
||||||
"name": "two",
|
"name": "two",
|
||||||
"start": 20,
|
"start": 14,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"name": "three",
|
"name": "three",
|
||||||
"start": 24,
|
"start": 18,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 34,
|
"end": 28,
|
||||||
"name": "four",
|
"name": "four",
|
||||||
"start": 30,
|
"start": 24,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 13,
|
"start": 7,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 34,
|
"end": 28,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 34,
|
"end": 28,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,45 +6,45 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 9,
|
"end": 3,
|
||||||
"name": "pt1",
|
"name": "pt1",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 14,
|
"end": 8,
|
||||||
"name": "b1",
|
"name": "b1",
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 16,
|
"end": 10,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 15,
|
"start": 9,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
},
|
},
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 17,
|
"end": 11,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,45 +6,45 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 22,
|
"end": 16,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 9,
|
"end": 3,
|
||||||
"name": "pt1",
|
"name": "pt1",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 22,
|
"end": 16,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 14,
|
"end": 8,
|
||||||
"name": "b1",
|
"name": "b1",
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 21,
|
"end": 15,
|
||||||
"raw": "'zero'",
|
"raw": "'zero'",
|
||||||
"start": 15,
|
"start": 9,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": "zero"
|
"value": "zero"
|
||||||
},
|
},
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 22,
|
"end": 16,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 22,
|
"end": 16,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,44 +6,44 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 19,
|
"end": 13,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 9,
|
"end": 3,
|
||||||
"name": "pt1",
|
"name": "pt1",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"computed": false,
|
"computed": false,
|
||||||
"end": 19,
|
"end": 13,
|
||||||
"object": {
|
"object": {
|
||||||
"end": 14,
|
"end": 8,
|
||||||
"name": "b1",
|
"name": "b1",
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"property": {
|
"property": {
|
||||||
"end": 19,
|
"end": 13,
|
||||||
"name": "zero",
|
"name": "zero",
|
||||||
"start": 15,
|
"start": 9,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 12,
|
"start": 6,
|
||||||
"type": "MemberExpression",
|
"type": "MemberExpression",
|
||||||
"type": "MemberExpression"
|
"type": "MemberExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 19,
|
"end": 13,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 19,
|
"end": 13,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,44 +6,44 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 8,
|
"end": 2,
|
||||||
"name": "sg",
|
"name": "sg",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 28,
|
"end": 22,
|
||||||
"name": "pos",
|
"name": "pos",
|
||||||
"start": 25,
|
"start": 19,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 24,
|
"end": 18,
|
||||||
"name": "startSketchAt",
|
"name": "startSketchAt",
|
||||||
"start": 11,
|
"start": 5,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"start": 11,
|
"start": 5,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,11 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 53,
|
"end": 47,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 8,
|
"end": 2,
|
||||||
"name": "sg",
|
"name": "sg",
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
@ -18,21 +18,21 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 28,
|
"end": 22,
|
||||||
"name": "pos",
|
"name": "pos",
|
||||||
"start": 25,
|
"start": 19,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 24,
|
"end": 18,
|
||||||
"name": "startSketchAt",
|
"name": "startSketchAt",
|
||||||
"start": 11,
|
"start": 5,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 29,
|
"end": 23,
|
||||||
"start": 11,
|
"start": 5,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
},
|
},
|
||||||
@ -41,67 +41,67 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 40,
|
"end": 34,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 39,
|
"start": 33,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": 0.0
|
"value": 0.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"argument": {
|
"argument": {
|
||||||
"end": 48,
|
"end": 42,
|
||||||
"name": "scale",
|
"name": "scale",
|
||||||
"start": 43,
|
"start": 37,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 48,
|
"end": 42,
|
||||||
"operator": "-",
|
"operator": "-",
|
||||||
"start": 42,
|
"start": 36,
|
||||||
"type": "UnaryExpression",
|
"type": "UnaryExpression",
|
||||||
"type": "UnaryExpression"
|
"type": "UnaryExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 49,
|
"end": 43,
|
||||||
"start": 38,
|
"start": 32,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 52,
|
"end": 46,
|
||||||
"start": 51,
|
"start": 45,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 37,
|
"end": 31,
|
||||||
"name": "line",
|
"name": "line",
|
||||||
"start": 33,
|
"start": 27,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 53,
|
"end": 47,
|
||||||
"start": 33,
|
"start": 27,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 53,
|
"end": 47,
|
||||||
"start": 11,
|
"start": 5,
|
||||||
"type": "PipeExpression",
|
"type": "PipeExpression",
|
||||||
"type": "PipeExpression"
|
"type": "PipeExpression"
|
||||||
},
|
},
|
||||||
"start": 6,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 53,
|
"end": 47,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 53,
|
"end": 47,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -27,8 +27,7 @@ description: Result of parsing import_constant.kcl
|
|||||||
},
|
},
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "ImportStatement",
|
"type": "ImportStatement",
|
||||||
"type": "ImportStatement",
|
"type": "ImportStatement"
|
||||||
"visibility": "default"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 40,
|
"end": 40,
|
||||||
|
@ -27,8 +27,7 @@ description: Result of parsing import_cycle1.kcl
|
|||||||
},
|
},
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "ImportStatement",
|
"type": "ImportStatement",
|
||||||
"type": "ImportStatement",
|
"type": "ImportStatement"
|
||||||
"visibility": "default"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
|
@ -27,8 +27,7 @@ description: Result of parsing import_export.kcl
|
|||||||
},
|
},
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "ImportStatement",
|
"type": "ImportStatement",
|
||||||
"type": "ImportStatement",
|
"type": "ImportStatement"
|
||||||
"visibility": "default"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 33,
|
"end": 33,
|
||||||
|
@ -15,8 +15,7 @@ description: Result of parsing import_glob.kcl
|
|||||||
},
|
},
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "ImportStatement",
|
"type": "ImportStatement",
|
||||||
"type": "ImportStatement",
|
"type": "ImportStatement"
|
||||||
"visibility": "default"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 36,
|
"end": 36,
|
||||||
|
@ -27,8 +27,7 @@ description: Result of parsing import_side_effect.kcl
|
|||||||
},
|
},
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "ImportStatement",
|
"type": "ImportStatement",
|
||||||
"type": "ImportStatement",
|
"type": "ImportStatement"
|
||||||
"visibility": "default"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 41,
|
"end": 41,
|
||||||
|