| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  | --- | 
					
						
							|  |  |  | source: kcl-lib/src/simulation_tests.rs | 
					
						
							|  |  |  | description: Result of parsing array_range_mismatch_units.kcl | 
					
						
							|  |  |  | --- | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   "Ok": { | 
					
						
							|  |  |  |     "body": [ | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         "commentStart": 0, | 
					
						
							|  |  |  |         "declaration": { | 
					
						
							|  |  |  |           "commentStart": 0, | 
					
						
							|  |  |  |           "end": 0, | 
					
						
							|  |  |  |           "id": { | 
					
						
							|  |  |  |             "commentStart": 0, | 
					
						
							|  |  |  |             "end": 0, | 
					
						
							| 
									
										
										
										
											2025-06-24 14:38:43 -04:00
										 |  |  |             "moduleId": 0, | 
					
						
							| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  |             "name": "a", | 
					
						
							|  |  |  |             "start": 0, | 
					
						
							|  |  |  |             "type": "Identifier" | 
					
						
							|  |  |  |           }, | 
					
						
							|  |  |  |           "init": { | 
					
						
							|  |  |  |             "commentStart": 0, | 
					
						
							|  |  |  |             "end": 0, | 
					
						
							|  |  |  |             "endElement": { | 
					
						
							|  |  |  |               "commentStart": 0, | 
					
						
							|  |  |  |               "end": 0, | 
					
						
							| 
									
										
										
										
											2025-06-24 14:38:43 -04:00
										 |  |  |               "moduleId": 0, | 
					
						
							| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  |               "raw": "3cm", | 
					
						
							|  |  |  |               "start": 0, | 
					
						
							|  |  |  |               "type": "Literal", | 
					
						
							|  |  |  |               "type": "Literal", | 
					
						
							|  |  |  |               "value": { | 
					
						
							|  |  |  |                 "value": 3.0, | 
					
						
							|  |  |  |                 "suffix": "Cm" | 
					
						
							|  |  |  |               } | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             "endInclusive": true, | 
					
						
							| 
									
										
										
										
											2025-06-24 14:38:43 -04:00
										 |  |  |             "moduleId": 0, | 
					
						
							| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  |             "start": 0, | 
					
						
							|  |  |  |             "startElement": { | 
					
						
							|  |  |  |               "commentStart": 0, | 
					
						
							|  |  |  |               "end": 0, | 
					
						
							| 
									
										
										
										
											2025-06-24 14:38:43 -04:00
										 |  |  |               "moduleId": 0, | 
					
						
							| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  |               "raw": "1mm", | 
					
						
							|  |  |  |               "start": 0, | 
					
						
							|  |  |  |               "type": "Literal", | 
					
						
							|  |  |  |               "type": "Literal", | 
					
						
							|  |  |  |               "value": { | 
					
						
							|  |  |  |                 "value": 1.0, | 
					
						
							|  |  |  |                 "suffix": "Mm" | 
					
						
							|  |  |  |               } | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             "type": "ArrayRangeExpression", | 
					
						
							|  |  |  |             "type": "ArrayRangeExpression" | 
					
						
							|  |  |  |           }, | 
					
						
							| 
									
										
										
										
											2025-06-24 14:38:43 -04:00
										 |  |  |           "moduleId": 0, | 
					
						
							| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  |           "start": 0, | 
					
						
							|  |  |  |           "type": "VariableDeclarator" | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         "end": 0, | 
					
						
							|  |  |  |         "kind": "const", | 
					
						
							| 
									
										
										
										
											2025-06-24 14:38:43 -04:00
										 |  |  |         "moduleId": 0, | 
					
						
							| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  |         "start": 0, | 
					
						
							|  |  |  |         "type": "VariableDeclaration", | 
					
						
							|  |  |  |         "type": "VariableDeclaration" | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         "commentStart": 0, | 
					
						
							|  |  |  |         "end": 0, | 
					
						
							|  |  |  |         "expression": { | 
					
						
							|  |  |  |           "arguments": [ | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |               "type": "LabeledArg", | 
					
						
							|  |  |  |               "label": { | 
					
						
							|  |  |  |                 "commentStart": 0, | 
					
						
							|  |  |  |                 "end": 0, | 
					
						
							| 
									
										
										
										
											2025-06-24 14:38:43 -04:00
										 |  |  |                 "moduleId": 0, | 
					
						
							| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  |                 "name": "error", | 
					
						
							|  |  |  |                 "start": 0, | 
					
						
							|  |  |  |                 "type": "Identifier" | 
					
						
							|  |  |  |               }, | 
					
						
							|  |  |  |               "arg": { | 
					
						
							|  |  |  |                 "commentStart": 0, | 
					
						
							|  |  |  |                 "end": 0, | 
					
						
							| 
									
										
										
										
											2025-06-24 14:38:43 -04:00
										 |  |  |                 "moduleId": 0, | 
					
						
							| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  |                 "raw": "\"shouldn't make it here\"", | 
					
						
							|  |  |  |                 "start": 0, | 
					
						
							|  |  |  |                 "type": "Literal", | 
					
						
							|  |  |  |                 "type": "Literal", | 
					
						
							|  |  |  |                 "value": "shouldn't make it here" | 
					
						
							|  |  |  |               } | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |           ], | 
					
						
							|  |  |  |           "callee": { | 
					
						
							|  |  |  |             "abs_path": false, | 
					
						
							|  |  |  |             "commentStart": 0, | 
					
						
							|  |  |  |             "end": 0, | 
					
						
							| 
									
										
										
										
											2025-06-24 14:38:43 -04:00
										 |  |  |             "moduleId": 0, | 
					
						
							| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  |             "name": { | 
					
						
							|  |  |  |               "commentStart": 0, | 
					
						
							|  |  |  |               "end": 0, | 
					
						
							| 
									
										
										
										
											2025-06-24 14:38:43 -04:00
										 |  |  |               "moduleId": 0, | 
					
						
							| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  |               "name": "assertIs", | 
					
						
							|  |  |  |               "start": 0, | 
					
						
							|  |  |  |               "type": "Identifier" | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             "path": [], | 
					
						
							|  |  |  |             "start": 0, | 
					
						
							|  |  |  |             "type": "Name" | 
					
						
							|  |  |  |           }, | 
					
						
							|  |  |  |           "commentStart": 0, | 
					
						
							|  |  |  |           "end": 0, | 
					
						
							| 
									
										
										
										
											2025-06-24 14:38:43 -04:00
										 |  |  |           "moduleId": 0, | 
					
						
							| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  |           "start": 0, | 
					
						
							|  |  |  |           "type": "CallExpressionKw", | 
					
						
							|  |  |  |           "type": "CallExpressionKw", | 
					
						
							|  |  |  |           "unlabeled": { | 
					
						
							|  |  |  |             "commentStart": 0, | 
					
						
							|  |  |  |             "end": 0, | 
					
						
							| 
									
										
										
										
											2025-06-24 14:38:43 -04:00
										 |  |  |             "moduleId": 0, | 
					
						
							| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  |             "raw": "false", | 
					
						
							|  |  |  |             "start": 0, | 
					
						
							|  |  |  |             "type": "Literal", | 
					
						
							|  |  |  |             "type": "Literal", | 
					
						
							|  |  |  |             "value": false | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |         }, | 
					
						
							| 
									
										
										
										
											2025-06-24 14:38:43 -04:00
										 |  |  |         "moduleId": 0, | 
					
						
							| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  |         "start": 0, | 
					
						
							|  |  |  |         "type": "ExpressionStatement", | 
					
						
							|  |  |  |         "type": "ExpressionStatement" | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     "commentStart": 0, | 
					
						
							|  |  |  |     "end": 0, | 
					
						
							| 
									
										
										
										
											2025-06-24 14:38:43 -04:00
										 |  |  |     "moduleId": 0, | 
					
						
							| 
									
										
										
										
											2025-05-12 01:30:33 -04:00
										 |  |  |     "start": 0 | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } |