* Support paths to names rather than just raw idents Signed-off-by: Nick Cameron <nrc@ncameron.org> * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
240 lines
6.3 KiB
Plaintext
240 lines
6.3 KiB
Plaintext
---
|
|
source: kcl-lib/src/simulation_tests.rs
|
|
description: Result of parsing import_whole.kcl
|
|
---
|
|
{
|
|
"Ok": {
|
|
"body": [
|
|
{
|
|
"commentStart": 33,
|
|
"end": 0,
|
|
"path": {
|
|
"type": "Kcl",
|
|
"filename": "exported_mod.kcl"
|
|
},
|
|
"selector": {
|
|
"type": "None",
|
|
"alias": {
|
|
"commentStart": 64,
|
|
"end": 0,
|
|
"name": "foo",
|
|
"start": 0,
|
|
"type": "Identifier"
|
|
}
|
|
},
|
|
"start": 0,
|
|
"type": "ImportStatement",
|
|
"type": "ImportStatement"
|
|
},
|
|
{
|
|
"commentStart": 67,
|
|
"declaration": {
|
|
"commentStart": 69,
|
|
"end": 0,
|
|
"id": {
|
|
"commentStart": 69,
|
|
"end": 0,
|
|
"name": "bar",
|
|
"start": 0,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"body": [
|
|
{
|
|
"abs_path": false,
|
|
"commentStart": 75,
|
|
"end": 0,
|
|
"name": {
|
|
"commentStart": 75,
|
|
"end": 0,
|
|
"name": "foo",
|
|
"start": 0,
|
|
"type": "Identifier"
|
|
},
|
|
"path": [],
|
|
"start": 0,
|
|
"type": "Name",
|
|
"type": "Name"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"commentStart": 90,
|
|
"end": 0,
|
|
"name": "faces",
|
|
"start": 0,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"commentStart": 98,
|
|
"elements": [
|
|
{
|
|
"commentStart": 99,
|
|
"end": 0,
|
|
"raw": "'end'",
|
|
"start": 0,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": "end"
|
|
}
|
|
],
|
|
"end": 0,
|
|
"start": 0,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"commentStart": 107,
|
|
"end": 0,
|
|
"name": "thickness",
|
|
"start": 0,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"abs_path": false,
|
|
"commentStart": 119,
|
|
"end": 0,
|
|
"name": {
|
|
"commentStart": 124,
|
|
"end": 0,
|
|
"name": "thickness",
|
|
"start": 0,
|
|
"type": "Identifier"
|
|
},
|
|
"path": [
|
|
{
|
|
"commentStart": 119,
|
|
"end": 0,
|
|
"name": "foo",
|
|
"start": 0,
|
|
"type": "Identifier"
|
|
}
|
|
],
|
|
"start": 0,
|
|
"type": "Name",
|
|
"type": "Name"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"abs_path": false,
|
|
"commentStart": 84,
|
|
"end": 0,
|
|
"name": {
|
|
"commentStart": 84,
|
|
"end": 0,
|
|
"name": "shell",
|
|
"start": 0,
|
|
"type": "Identifier"
|
|
},
|
|
"path": [],
|
|
"start": 0,
|
|
"type": "Name"
|
|
},
|
|
"commentStart": 84,
|
|
"end": 0,
|
|
"start": 0,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
}
|
|
],
|
|
"commentStart": 75,
|
|
"end": 0,
|
|
"start": 0,
|
|
"type": "PipeExpression",
|
|
"type": "PipeExpression"
|
|
},
|
|
"start": 0,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 0,
|
|
"kind": "const",
|
|
"start": 0,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
}
|
|
],
|
|
"commentStart": 0,
|
|
"end": 0,
|
|
"innerAttrs": [
|
|
{
|
|
"commentStart": 0,
|
|
"end": 0,
|
|
"name": {
|
|
"commentStart": 1,
|
|
"end": 0,
|
|
"name": "settings",
|
|
"start": 0,
|
|
"type": "Identifier"
|
|
},
|
|
"properties": [
|
|
{
|
|
"commentStart": 10,
|
|
"end": 0,
|
|
"key": {
|
|
"commentStart": 10,
|
|
"end": 0,
|
|
"name": "defaultLengthUnit",
|
|
"start": 0,
|
|
"type": "Identifier"
|
|
},
|
|
"start": 0,
|
|
"type": "ObjectProperty",
|
|
"value": {
|
|
"abs_path": false,
|
|
"commentStart": 30,
|
|
"end": 0,
|
|
"name": {
|
|
"commentStart": 30,
|
|
"end": 0,
|
|
"name": "mm",
|
|
"start": 0,
|
|
"type": "Identifier"
|
|
},
|
|
"path": [],
|
|
"start": 0,
|
|
"type": "Name",
|
|
"type": "Name"
|
|
}
|
|
}
|
|
],
|
|
"start": 0,
|
|
"type": "Annotation"
|
|
}
|
|
],
|
|
"nonCodeMeta": {
|
|
"nonCodeNodes": {
|
|
"0": [
|
|
{
|
|
"commentStart": 67,
|
|
"end": 0,
|
|
"start": 0,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "newLine"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"startNodes": [
|
|
{
|
|
"commentStart": 33,
|
|
"end": 0,
|
|
"start": 0,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "newLine"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"start": 0
|
|
}
|
|
}
|