| 
									
										
										
										
											2024-11-18 16:20:32 -06:00
										 |  |  | --- | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  | source: kcl-lib/src/simulation_tests.rs | 
					
						
							| 
									
										
										
										
											2024-11-18 16:20:32 -06:00
										 |  |  | description: Result of parsing import_cycle1.kcl | 
					
						
							|  |  |  | --- | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   "Ok": { | 
					
						
							|  |  |  |     "body": [ | 
					
						
							|  |  |  |       { | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |         "commentStart": 33, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |         "end": 0, | 
					
						
							| 
									
										
										
										
											2025-01-29 08:28:32 +13:00
										 |  |  |         "path": { | 
					
						
							|  |  |  |           "type": "Kcl", | 
					
						
							|  |  |  |           "filename": "import_cycle2.kcl" | 
					
						
							|  |  |  |         }, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |         "selector": { | 
					
						
							|  |  |  |           "type": "List", | 
					
						
							|  |  |  |           "items": [ | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |               "alias": null, | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |               "commentStart": 42, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |               "end": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |               "name": { | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |                 "commentStart": 42, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |                 "end": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |                 "name": "two", | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |                 "start": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |                 "type": "Identifier" | 
					
						
							|  |  |  |               }, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |               "start": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |               "type": "ImportItem" | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |           ] | 
					
						
							|  |  |  |         }, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |         "start": 0, | 
					
						
							| 
									
										
										
										
											2024-11-18 16:20:32 -06:00
										 |  |  |         "type": "ImportStatement", | 
					
						
							| 
									
										
										
										
											2024-12-10 04:42:03 +13:00
										 |  |  |         "type": "ImportStatement" | 
					
						
							| 
									
										
										
										
											2024-11-18 16:20:32 -06:00
										 |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |         "commentStart": 70, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |         "declaration": { | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |           "commentStart": 82, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |           "end": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |           "id": { | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |             "commentStart": 82, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |             "end": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |             "name": "one", | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |             "start": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |             "type": "Identifier" | 
					
						
							|  |  |  |           }, | 
					
						
							|  |  |  |           "init": { | 
					
						
							|  |  |  |             "body": { | 
					
						
							|  |  |  |               "body": [ | 
					
						
							|  |  |  |                 { | 
					
						
							|  |  |  |                   "argument": { | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |                     "commentStart": 99, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |                     "end": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |                     "left": { | 
					
						
							|  |  |  |                       "arguments": [], | 
					
						
							|  |  |  |                       "callee": { | 
					
						
							| 
									
										
										
										
											2025-03-24 20:58:55 +13:00
										 |  |  |                         "abs_path": false, | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |                         "commentStart": 99, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |                         "end": 0, | 
					
						
							| 
									
										
										
										
											2025-03-24 20:58:55 +13:00
										 |  |  |                         "name": { | 
					
						
							|  |  |  |                           "commentStart": 99, | 
					
						
							|  |  |  |                           "end": 0, | 
					
						
							|  |  |  |                           "name": "two", | 
					
						
							|  |  |  |                           "start": 0, | 
					
						
							|  |  |  |                           "type": "Identifier" | 
					
						
							|  |  |  |                         }, | 
					
						
							|  |  |  |                         "path": [], | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |                         "start": 0, | 
					
						
							| 
									
										
										
										
											2025-03-24 20:58:55 +13:00
										 |  |  |                         "type": "Name" | 
					
						
							| 
									
										
										
										
											2024-11-18 16:20:32 -06:00
										 |  |  |                       }, | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |                       "commentStart": 99, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |                       "end": 0, | 
					
						
							|  |  |  |                       "start": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |                       "type": "CallExpression", | 
					
						
							|  |  |  |                       "type": "CallExpression" | 
					
						
							| 
									
										
										
										
											2024-11-18 16:20:32 -06:00
										 |  |  |                     }, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |                     "operator": "-", | 
					
						
							|  |  |  |                     "right": { | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |                       "commentStart": 107, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |                       "end": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |                       "raw": "1", | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |                       "start": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |                       "type": "Literal", | 
					
						
							|  |  |  |                       "type": "Literal", | 
					
						
							| 
									
										
										
										
											2025-01-22 08:29:30 +13:00
										 |  |  |                       "value": { | 
					
						
							|  |  |  |                         "value": 1.0, | 
					
						
							|  |  |  |                         "suffix": "None" | 
					
						
							|  |  |  |                       } | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |                     }, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |                     "start": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |                     "type": "BinaryExpression", | 
					
						
							|  |  |  |                     "type": "BinaryExpression" | 
					
						
							|  |  |  |                   }, | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |                   "commentStart": 92, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |                   "end": 0, | 
					
						
							|  |  |  |                   "start": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |                   "type": "ReturnStatement", | 
					
						
							|  |  |  |                   "type": "ReturnStatement" | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |               ], | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |               "commentStart": 88, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |               "end": 0, | 
					
						
							|  |  |  |               "start": 0 | 
					
						
							| 
									
										
										
										
											2024-11-18 16:20:32 -06:00
										 |  |  |             }, | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |             "commentStart": 85, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |             "end": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |             "params": [], | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |             "start": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |             "type": "FunctionExpression", | 
					
						
							|  |  |  |             "type": "FunctionExpression" | 
					
						
							|  |  |  |           }, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |           "start": 0, | 
					
						
							| 
									
										
										
										
											2024-12-07 07:16:04 +13:00
										 |  |  |           "type": "VariableDeclarator" | 
					
						
							|  |  |  |         }, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |         "end": 0, | 
					
						
							| 
									
										
										
										
											2024-11-18 16:20:32 -06:00
										 |  |  |         "kind": "fn", | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |         "start": 0, | 
					
						
							| 
									
										
										
										
											2024-11-18 16:20:32 -06:00
										 |  |  |         "type": "VariableDeclaration", | 
					
						
							|  |  |  |         "type": "VariableDeclaration", | 
					
						
							|  |  |  |         "visibility": "export" | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     ], | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |     "commentStart": 0, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |     "end": 0, | 
					
						
							| 
									
										
										
										
											2025-02-13 16:17:09 +13:00
										 |  |  |     "innerAttrs": [ | 
					
						
							|  |  |  |       { | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |         "commentStart": 0, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |         "end": 0, | 
					
						
							| 
									
										
										
										
											2025-02-13 16:17:09 +13:00
										 |  |  |         "name": { | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |           "commentStart": 1, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |           "end": 0, | 
					
						
							| 
									
										
										
										
											2025-02-13 16:17:09 +13:00
										 |  |  |           "name": "settings", | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |           "start": 0, | 
					
						
							| 
									
										
										
										
											2025-02-13 16:17:09 +13:00
										 |  |  |           "type": "Identifier" | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         "properties": [ | 
					
						
							|  |  |  |           { | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |             "commentStart": 10, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |             "end": 0, | 
					
						
							| 
									
										
										
										
											2025-02-13 16:17:09 +13:00
										 |  |  |             "key": { | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |               "commentStart": 10, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |               "end": 0, | 
					
						
							| 
									
										
										
										
											2025-02-13 16:17:09 +13:00
										 |  |  |               "name": "defaultLengthUnit", | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |               "start": 0, | 
					
						
							| 
									
										
										
										
											2025-02-13 16:17:09 +13:00
										 |  |  |               "type": "Identifier" | 
					
						
							|  |  |  |             }, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |             "start": 0, | 
					
						
							| 
									
										
										
										
											2025-02-13 16:17:09 +13:00
										 |  |  |             "type": "ObjectProperty", | 
					
						
							|  |  |  |             "value": { | 
					
						
							| 
									
										
										
										
											2025-03-24 20:58:55 +13:00
										 |  |  |               "abs_path": false, | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |               "commentStart": 30, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |               "end": 0, | 
					
						
							| 
									
										
										
										
											2025-03-24 20:58:55 +13:00
										 |  |  |               "name": { | 
					
						
							|  |  |  |                 "commentStart": 30, | 
					
						
							|  |  |  |                 "end": 0, | 
					
						
							|  |  |  |                 "name": "in", | 
					
						
							|  |  |  |                 "start": 0, | 
					
						
							|  |  |  |                 "type": "Identifier" | 
					
						
							|  |  |  |               }, | 
					
						
							|  |  |  |               "path": [], | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |               "start": 0, | 
					
						
							| 
									
										
										
										
											2025-03-24 20:58:55 +13:00
										 |  |  |               "type": "Name", | 
					
						
							|  |  |  |               "type": "Name" | 
					
						
							| 
									
										
										
										
											2025-02-13 16:17:09 +13:00
										 |  |  |             } | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |         ], | 
					
						
							|  |  |  |         "start": 0, | 
					
						
							|  |  |  |         "type": "Annotation" | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     ], | 
					
						
							| 
									
										
										
										
											2024-11-18 16:20:32 -06:00
										 |  |  |     "nonCodeMeta": { | 
					
						
							|  |  |  |       "nonCodeNodes": { | 
					
						
							|  |  |  |         "0": [ | 
					
						
							|  |  |  |           { | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |             "commentStart": 70, | 
					
						
							| 
									
										
										
										
											2025-03-20 11:06:27 +13:00
										 |  |  |             "end": 0, | 
					
						
							|  |  |  |             "start": 0, | 
					
						
							| 
									
										
										
										
											2024-11-18 16:20:32 -06:00
										 |  |  |             "type": "NonCodeNode", | 
					
						
							|  |  |  |             "value": { | 
					
						
							|  |  |  |               "type": "newLine" | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |         ] | 
					
						
							|  |  |  |       }, | 
					
						
							| 
									
										
										
										
											2025-03-20 16:23:20 +13:00
										 |  |  |       "startNodes": [ | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |           "commentStart": 33, | 
					
						
							|  |  |  |           "end": 0, | 
					
						
							|  |  |  |           "start": 0, | 
					
						
							|  |  |  |           "type": "NonCodeNode", | 
					
						
							|  |  |  |           "value": { | 
					
						
							|  |  |  |             "type": "newLine" | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       ] | 
					
						
							| 
									
										
										
										
											2024-11-18 16:20:32 -06:00
										 |  |  |     }, | 
					
						
							|  |  |  |     "start": 0 | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } |