Files
modeling-app/rust/kcl-lib/tests/import_function_not_sketch/ast.snap

203 lines
5.1 KiB
Plaintext
Raw Normal View History

---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing import_function_not_sketch.kcl
---
{
"Ok": {
"body": [
{
"commentStart": 33,
"end": 0,
"path": {
"type": "Kcl",
"filename": "my_functions.kcl"
},
"selector": {
"type": "List",
"items": [
{
"alias": null,
"commentStart": 42,
"end": 0,
"name": {
"commentStart": 42,
"end": 0,
"name": "two",
"start": 0,
"type": "Identifier"
},
"start": 0,
"type": "ImportItem"
}
]
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 69,
"declaration": {
"commentStart": 81,
"end": 0,
"id": {
"commentStart": 81,
"end": 0,
"name": "one",
"start": 0,
"type": "Identifier"
},
"init": {
"body": {
"body": [
{
"argument": {
"commentStart": 98,
"end": 0,
"left": {
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 98,
"end": 0,
"name": {
"commentStart": 98,
"end": 0,
"name": "two",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 98,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
"operator": "-",
"right": {
"commentStart": 106,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"commentStart": 91,
"end": 0,
"start": 0,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"commentStart": 87,
"end": 0,
"start": 0
},
"commentStart": 84,
"end": 0,
"params": [],
"start": 0,
"type": "FunctionExpression",
"type": "FunctionExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "fn",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration",
"visibility": "export"
}
],
"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": "in",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"start": 0,
"type": "Annotation"
}
],
"nonCodeMeta": {
"nonCodeNodes": {
"0": [
{
"commentStart": 69,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"startNodes": [
{
"commentStart": 33,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"start": 0
}
}