187 lines
		
	
	
		
			4.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			187 lines
		
	
	
		
			4.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| ---
 | |
| source: kcl-lib/src/simulation_tests.rs
 | |
| description: Result of parsing import_cycle1.kcl
 | |
| ---
 | |
| {
 | |
|   "Ok": {
 | |
|     "body": [
 | |
|       {
 | |
|         "commentStart": 33,
 | |
|         "end": 0,
 | |
|         "path": {
 | |
|           "type": "Kcl",
 | |
|           "filename": "import_cycle2.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": 70,
 | |
|         "declaration": {
 | |
|           "commentStart": 82,
 | |
|           "end": 0,
 | |
|           "id": {
 | |
|             "commentStart": 82,
 | |
|             "end": 0,
 | |
|             "name": "one",
 | |
|             "start": 0,
 | |
|             "type": "Identifier"
 | |
|           },
 | |
|           "init": {
 | |
|             "body": {
 | |
|               "body": [
 | |
|                 {
 | |
|                   "argument": {
 | |
|                     "commentStart": 99,
 | |
|                     "end": 0,
 | |
|                     "left": {
 | |
|                       "arguments": [],
 | |
|                       "callee": {
 | |
|                         "commentStart": 99,
 | |
|                         "end": 0,
 | |
|                         "name": "two",
 | |
|                         "start": 0,
 | |
|                         "type": "Identifier"
 | |
|                       },
 | |
|                       "commentStart": 99,
 | |
|                       "end": 0,
 | |
|                       "start": 0,
 | |
|                       "type": "CallExpression",
 | |
|                       "type": "CallExpression"
 | |
|                     },
 | |
|                     "operator": "-",
 | |
|                     "right": {
 | |
|                       "commentStart": 107,
 | |
|                       "end": 0,
 | |
|                       "raw": "1",
 | |
|                       "start": 0,
 | |
|                       "type": "Literal",
 | |
|                       "type": "Literal",
 | |
|                       "value": {
 | |
|                         "value": 1.0,
 | |
|                         "suffix": "None"
 | |
|                       }
 | |
|                     },
 | |
|                     "start": 0,
 | |
|                     "type": "BinaryExpression",
 | |
|                     "type": "BinaryExpression"
 | |
|                   },
 | |
|                   "commentStart": 92,
 | |
|                   "end": 0,
 | |
|                   "start": 0,
 | |
|                   "type": "ReturnStatement",
 | |
|                   "type": "ReturnStatement"
 | |
|                 }
 | |
|               ],
 | |
|               "commentStart": 88,
 | |
|               "end": 0,
 | |
|               "start": 0
 | |
|             },
 | |
|             "commentStart": 85,
 | |
|             "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": {
 | |
|               "commentStart": 30,
 | |
|               "end": 0,
 | |
|               "name": "in",
 | |
|               "start": 0,
 | |
|               "type": "Identifier",
 | |
|               "type": "Identifier"
 | |
|             }
 | |
|           }
 | |
|         ],
 | |
|         "start": 0,
 | |
|         "type": "Annotation"
 | |
|       }
 | |
|     ],
 | |
|     "nonCodeMeta": {
 | |
|       "nonCodeNodes": {
 | |
|         "0": [
 | |
|           {
 | |
|             "commentStart": 70,
 | |
|             "end": 0,
 | |
|             "start": 0,
 | |
|             "type": "NonCodeNode",
 | |
|             "value": {
 | |
|               "type": "newLine"
 | |
|             }
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "startNodes": [
 | |
|         {
 | |
|           "commentStart": 33,
 | |
|           "end": 0,
 | |
|           "start": 0,
 | |
|           "type": "NonCodeNode",
 | |
|           "value": {
 | |
|             "type": "newLine"
 | |
|           }
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     "start": 0
 | |
|   }
 | |
| }
 |