* git mv src/wasm-lib rust Signed-off-by: Jess Frazelle <github@jessfraz.com> * mv wasm-lib to workspace Signed-off-by: Jess Frazelle <github@jessfraz.com> * mv kcl-lib Signed-off-by: Jess Frazelle <github@jessfraz.com> * mv derive docs Signed-off-by: Jess Frazelle <github@jessfraz.com> * resolve file paths Signed-off-by: Jess Frazelle <github@jessfraz.com> * clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * move more shit Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix more paths Signed-off-by: Jess Frazelle <github@jessfraz.com> * make yarn build:wasm work Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix scripts Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * better references Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix cargo ci Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix reference Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix more ci Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * cargo sort Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix script Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix a dep Signed-off-by: Jess Frazelle <github@jessfraz.com> * sort Signed-off-by: Jess Frazelle <github@jessfraz.com> * remove unused deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * Revert "remove unused deps" This reverts commit fbabdb062e275fd5cbc1476f8480a1afee15d972. * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * deps; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
		
			
				
	
	
		
			293 lines
		
	
	
		
			7.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			293 lines
		
	
	
		
			7.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| ---
 | |
| source: kcl/src/simulation_tests.rs
 | |
| description: Result of parsing kw_fn.kcl
 | |
| ---
 | |
| {
 | |
|   "Ok": {
 | |
|     "body": [
 | |
|       {
 | |
|         "declaration": {
 | |
|           "end": 35,
 | |
|           "id": {
 | |
|             "end": 12,
 | |
|             "name": "increment",
 | |
|             "start": 3,
 | |
|             "type": "Identifier"
 | |
|           },
 | |
|           "init": {
 | |
|             "body": {
 | |
|               "body": [
 | |
|                 {
 | |
|                   "argument": {
 | |
|                     "end": 33,
 | |
|                     "left": {
 | |
|                       "end": 29,
 | |
|                       "name": "x",
 | |
|                       "start": 28,
 | |
|                       "type": "Identifier",
 | |
|                       "type": "Identifier"
 | |
|                     },
 | |
|                     "operator": "+",
 | |
|                     "right": {
 | |
|                       "end": 33,
 | |
|                       "raw": "1",
 | |
|                       "start": 32,
 | |
|                       "type": "Literal",
 | |
|                       "type": "Literal",
 | |
|                       "value": {
 | |
|                         "value": 1.0,
 | |
|                         "suffix": "None"
 | |
|                       }
 | |
|                     },
 | |
|                     "start": 28,
 | |
|                     "type": "BinaryExpression",
 | |
|                     "type": "BinaryExpression"
 | |
|                   },
 | |
|                   "end": 33,
 | |
|                   "start": 21,
 | |
|                   "type": "ReturnStatement",
 | |
|                   "type": "ReturnStatement"
 | |
|                 }
 | |
|               ],
 | |
|               "end": 35,
 | |
|               "start": 17
 | |
|             },
 | |
|             "end": 35,
 | |
|             "params": [
 | |
|               {
 | |
|                 "type": "Parameter",
 | |
|                 "identifier": {
 | |
|                   "end": 15,
 | |
|                   "name": "x",
 | |
|                   "start": 14,
 | |
|                   "type": "Identifier"
 | |
|                 },
 | |
|                 "labeled": false
 | |
|               }
 | |
|             ],
 | |
|             "start": 12,
 | |
|             "type": "FunctionExpression",
 | |
|             "type": "FunctionExpression"
 | |
|           },
 | |
|           "start": 3,
 | |
|           "type": "VariableDeclarator"
 | |
|         },
 | |
|         "end": 35,
 | |
|         "kind": "fn",
 | |
|         "start": 0,
 | |
|         "type": "VariableDeclaration",
 | |
|         "type": "VariableDeclaration"
 | |
|       },
 | |
|       {
 | |
|         "declaration": {
 | |
|           "end": 77,
 | |
|           "id": {
 | |
|             "end": 43,
 | |
|             "name": "add",
 | |
|             "start": 40,
 | |
|             "type": "Identifier"
 | |
|           },
 | |
|           "init": {
 | |
|             "body": {
 | |
|               "body": [
 | |
|                 {
 | |
|                   "argument": {
 | |
|                     "end": 75,
 | |
|                     "left": {
 | |
|                       "end": 67,
 | |
|                       "name": "x",
 | |
|                       "start": 66,
 | |
|                       "type": "Identifier",
 | |
|                       "type": "Identifier"
 | |
|                     },
 | |
|                     "operator": "+",
 | |
|                     "right": {
 | |
|                       "end": 75,
 | |
|                       "name": "delta",
 | |
|                       "start": 70,
 | |
|                       "type": "Identifier",
 | |
|                       "type": "Identifier"
 | |
|                     },
 | |
|                     "start": 66,
 | |
|                     "type": "BinaryExpression",
 | |
|                     "type": "BinaryExpression"
 | |
|                   },
 | |
|                   "end": 75,
 | |
|                   "start": 59,
 | |
|                   "type": "ReturnStatement",
 | |
|                   "type": "ReturnStatement"
 | |
|                 }
 | |
|               ],
 | |
|               "end": 77,
 | |
|               "start": 55
 | |
|             },
 | |
|             "end": 77,
 | |
|             "params": [
 | |
|               {
 | |
|                 "type": "Parameter",
 | |
|                 "identifier": {
 | |
|                   "end": 46,
 | |
|                   "name": "x",
 | |
|                   "start": 45,
 | |
|                   "type": "Identifier"
 | |
|                 },
 | |
|                 "labeled": false
 | |
|               },
 | |
|               {
 | |
|                 "type": "Parameter",
 | |
|                 "identifier": {
 | |
|                   "end": 53,
 | |
|                   "name": "delta",
 | |
|                   "start": 48,
 | |
|                   "type": "Identifier"
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "start": 43,
 | |
|             "type": "FunctionExpression",
 | |
|             "type": "FunctionExpression"
 | |
|           },
 | |
|           "start": 40,
 | |
|           "type": "VariableDeclarator"
 | |
|         },
 | |
|         "end": 77,
 | |
|         "kind": "fn",
 | |
|         "start": 37,
 | |
|         "type": "VariableDeclaration",
 | |
|         "type": "VariableDeclaration"
 | |
|       },
 | |
|       {
 | |
|         "declaration": {
 | |
|           "end": 97,
 | |
|           "id": {
 | |
|             "end": 82,
 | |
|             "name": "two",
 | |
|             "start": 79,
 | |
|             "type": "Identifier"
 | |
|           },
 | |
|           "init": {
 | |
|             "arguments": [
 | |
|               {
 | |
|                 "end": 96,
 | |
|                 "raw": "1",
 | |
|                 "start": 95,
 | |
|                 "type": "Literal",
 | |
|                 "type": "Literal",
 | |
|                 "value": {
 | |
|                   "value": 1.0,
 | |
|                   "suffix": "None"
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "callee": {
 | |
|               "end": 94,
 | |
|               "name": "increment",
 | |
|               "start": 85,
 | |
|               "type": "Identifier"
 | |
|             },
 | |
|             "end": 97,
 | |
|             "start": 85,
 | |
|             "type": "CallExpression",
 | |
|             "type": "CallExpression"
 | |
|           },
 | |
|           "start": 79,
 | |
|           "type": "VariableDeclarator"
 | |
|         },
 | |
|         "end": 97,
 | |
|         "kind": "const",
 | |
|         "start": 79,
 | |
|         "type": "VariableDeclaration",
 | |
|         "type": "VariableDeclaration"
 | |
|       },
 | |
|       {
 | |
|         "declaration": {
 | |
|           "end": 123,
 | |
|           "id": {
 | |
|             "end": 103,
 | |
|             "name": "three",
 | |
|             "start": 98,
 | |
|             "type": "Identifier"
 | |
|           },
 | |
|           "init": {
 | |
|             "arguments": [
 | |
|               {
 | |
|                 "type": "LabeledArg",
 | |
|                 "label": {
 | |
|                   "type": "Identifier",
 | |
|                   "name": "delta"
 | |
|                 },
 | |
|                 "arg": {
 | |
|                   "end": 122,
 | |
|                   "raw": "2",
 | |
|                   "start": 121,
 | |
|                   "type": "Literal",
 | |
|                   "type": "Literal",
 | |
|                   "value": {
 | |
|                     "value": 2.0,
 | |
|                     "suffix": "None"
 | |
|                   }
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "callee": {
 | |
|               "end": 109,
 | |
|               "name": "add",
 | |
|               "start": 106,
 | |
|               "type": "Identifier"
 | |
|             },
 | |
|             "end": 123,
 | |
|             "start": 106,
 | |
|             "type": "CallExpressionKw",
 | |
|             "type": "CallExpressionKw",
 | |
|             "unlabeled": {
 | |
|               "end": 111,
 | |
|               "raw": "1",
 | |
|               "start": 110,
 | |
|               "type": "Literal",
 | |
|               "type": "Literal",
 | |
|               "value": {
 | |
|                 "value": 1.0,
 | |
|                 "suffix": "None"
 | |
|               }
 | |
|             }
 | |
|           },
 | |
|           "start": 98,
 | |
|           "type": "VariableDeclarator"
 | |
|         },
 | |
|         "end": 123,
 | |
|         "kind": "const",
 | |
|         "start": 98,
 | |
|         "type": "VariableDeclaration",
 | |
|         "type": "VariableDeclaration"
 | |
|       }
 | |
|     ],
 | |
|     "end": 124,
 | |
|     "nonCodeMeta": {
 | |
|       "nonCodeNodes": {
 | |
|         "0": [
 | |
|           {
 | |
|             "end": 37,
 | |
|             "start": 35,
 | |
|             "type": "NonCodeNode",
 | |
|             "value": {
 | |
|               "type": "newLine"
 | |
|             }
 | |
|           }
 | |
|         ],
 | |
|         "1": [
 | |
|           {
 | |
|             "end": 79,
 | |
|             "start": 77,
 | |
|             "type": "NonCodeNode",
 | |
|             "value": {
 | |
|               "type": "newLine"
 | |
|             }
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "startNodes": []
 | |
|     },
 | |
|     "start": 0
 | |
|   }
 | |
| }
 |