--- source: kcl-lib/src/simulation_tests.rs description: Result of parsing boolean_logical_and.kcl --- { "Ok": { "body": [ { "commentStart": 0, "declaration": { "commentStart": 0, "end": 0, "id": { "commentStart": 0, "end": 0, "name": "aa", "start": 0, "type": "Identifier" }, "init": { "commentStart": 5, "end": 0, "left": { "commentStart": 5, "end": 0, "raw": "true", "start": 0, "type": "Literal", "type": "Literal", "value": true }, "operator": "&", "right": { "commentStart": 12, "end": 0, "raw": "false", "start": 0, "type": "Literal", "type": "Literal", "value": false }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 18, "declaration": { "commentStart": 18, "end": 0, "id": { "commentStart": 18, "end": 0, "name": "a", "start": 0, "type": "Identifier" }, "init": { "commentStart": 22, "cond": { "abs_path": false, "commentStart": 25, "end": 0, "name": { "commentStart": 25, "end": 0, "name": "aa", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "digest": null, "else_ifs": [], "end": 0, "final_else": { "body": [ { "commentStart": 45, "end": 0, "expression": { "commentStart": 45, "end": 0, "raw": "2", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 0, "type": "ExpressionStatement", "type": "ExpressionStatement" } ], "commentStart": 45, "end": 0, "start": 0 }, "start": 0, "then_val": { "body": [ { "commentStart": 32, "end": 0, "expression": { "commentStart": 32, "end": 0, "raw": "1", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } }, "start": 0, "type": "ExpressionStatement", "type": "ExpressionStatement" } ], "commentStart": 32, "end": 0, "start": 0 }, "type": "IfExpression", "type": "IfExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 49, "end": 0, "expression": { "arguments": [ { "commentStart": 56, "end": 0, "left": { "abs_path": false, "commentStart": 56, "end": 0, "name": { "commentStart": 56, "end": 0, "name": "a", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "==", "right": { "commentStart": 61, "end": 0, "raw": "2", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, { "commentStart": 64, "end": 0, "raw": "\"right branch of and is false makes the whole expression false\"", "start": 0, "type": "Literal", "type": "Literal", "value": "right branch of and is false makes the whole expression false" } ], "callee": { "abs_path": false, "commentStart": 49, "end": 0, "name": { "commentStart": 49, "end": 0, "name": "assert", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 49, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, "start": 0, "type": "ExpressionStatement", "type": "ExpressionStatement" }, { "commentStart": 128, "declaration": { "commentStart": 130, "end": 0, "id": { "commentStart": 130, "end": 0, "name": "bb", "start": 0, "type": "Identifier" }, "init": { "commentStart": 135, "end": 0, "left": { "commentStart": 135, "end": 0, "raw": "false", "start": 0, "type": "Literal", "type": "Literal", "value": false }, "operator": "&", "right": { "commentStart": 143, "end": 0, "raw": "true", "start": 0, "type": "Literal", "type": "Literal", "value": true }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 148, "declaration": { "commentStart": 148, "end": 0, "id": { "commentStart": 148, "end": 0, "name": "b", "start": 0, "type": "Identifier" }, "init": { "commentStart": 152, "cond": { "abs_path": false, "commentStart": 155, "end": 0, "name": { "commentStart": 155, "end": 0, "name": "bb", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "digest": null, "else_ifs": [], "end": 0, "final_else": { "body": [ { "commentStart": 175, "end": 0, "expression": { "commentStart": 175, "end": 0, "raw": "2", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 0, "type": "ExpressionStatement", "type": "ExpressionStatement" } ], "commentStart": 175, "end": 0, "start": 0 }, "start": 0, "then_val": { "body": [ { "commentStart": 162, "end": 0, "expression": { "commentStart": 162, "end": 0, "raw": "1", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } }, "start": 0, "type": "ExpressionStatement", "type": "ExpressionStatement" } ], "commentStart": 162, "end": 0, "start": 0 }, "type": "IfExpression", "type": "IfExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 179, "end": 0, "expression": { "arguments": [ { "commentStart": 186, "end": 0, "left": { "abs_path": false, "commentStart": 186, "end": 0, "name": { "commentStart": 186, "end": 0, "name": "b", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "==", "right": { "commentStart": 191, "end": 0, "raw": "2", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, { "commentStart": 194, "end": 0, "raw": "\"left branch of and is false makes the whole expression false\"", "start": 0, "type": "Literal", "type": "Literal", "value": "left branch of and is false makes the whole expression false" } ], "callee": { "abs_path": false, "commentStart": 179, "end": 0, "name": { "commentStart": 179, "end": 0, "name": "assert", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 179, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, "start": 0, "type": "ExpressionStatement", "type": "ExpressionStatement" }, { "commentStart": 257, "declaration": { "commentStart": 259, "end": 0, "id": { "commentStart": 259, "end": 0, "name": "cc", "start": 0, "type": "Identifier" }, "init": { "commentStart": 264, "end": 0, "left": { "commentStart": 264, "end": 0, "raw": "true", "start": 0, "type": "Literal", "type": "Literal", "value": true }, "operator": "&", "right": { "commentStart": 271, "end": 0, "raw": "true", "start": 0, "type": "Literal", "type": "Literal", "value": true }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 276, "declaration": { "commentStart": 276, "end": 0, "id": { "commentStart": 276, "end": 0, "name": "c", "start": 0, "type": "Identifier" }, "init": { "commentStart": 280, "cond": { "abs_path": false, "commentStart": 283, "end": 0, "name": { "commentStart": 283, "end": 0, "name": "cc", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "digest": null, "else_ifs": [], "end": 0, "final_else": { "body": [ { "commentStart": 303, "end": 0, "expression": { "commentStart": 303, "end": 0, "raw": "2", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 0, "type": "ExpressionStatement", "type": "ExpressionStatement" } ], "commentStart": 303, "end": 0, "start": 0 }, "start": 0, "then_val": { "body": [ { "commentStart": 290, "end": 0, "expression": { "commentStart": 290, "end": 0, "raw": "1", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } }, "start": 0, "type": "ExpressionStatement", "type": "ExpressionStatement" } ], "commentStart": 290, "end": 0, "start": 0 }, "type": "IfExpression", "type": "IfExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 307, "end": 0, "expression": { "arguments": [ { "commentStart": 314, "end": 0, "left": { "abs_path": false, "commentStart": 314, "end": 0, "name": { "commentStart": 314, "end": 0, "name": "c", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "==", "right": { "commentStart": 319, "end": 0, "raw": "1", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, { "commentStart": 322, "end": 0, "raw": "\"both branches of and are true makes the whole expression true\"", "start": 0, "type": "Literal", "type": "Literal", "value": "both branches of and are true makes the whole expression true" } ], "callee": { "abs_path": false, "commentStart": 307, "end": 0, "name": { "commentStart": 307, "end": 0, "name": "assert", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 307, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, "start": 0, "type": "ExpressionStatement", "type": "ExpressionStatement" }, { "commentStart": 386, "declaration": { "commentStart": 388, "end": 0, "id": { "commentStart": 388, "end": 0, "name": "dd", "start": 0, "type": "Identifier" }, "init": { "commentStart": 393, "end": 0, "left": { "commentStart": 393, "end": 0, "raw": "false", "start": 0, "type": "Literal", "type": "Literal", "value": false }, "operator": "&", "right": { "commentStart": 401, "end": 0, "raw": "false", "start": 0, "type": "Literal", "type": "Literal", "value": false }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 407, "declaration": { "commentStart": 407, "end": 0, "id": { "commentStart": 407, "end": 0, "name": "d", "start": 0, "type": "Identifier" }, "init": { "commentStart": 411, "cond": { "abs_path": false, "commentStart": 414, "end": 0, "name": { "commentStart": 414, "end": 0, "name": "dd", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "digest": null, "else_ifs": [], "end": 0, "final_else": { "body": [ { "commentStart": 434, "end": 0, "expression": { "commentStart": 434, "end": 0, "raw": "2", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 0, "type": "ExpressionStatement", "type": "ExpressionStatement" } ], "commentStart": 434, "end": 0, "start": 0 }, "start": 0, "then_val": { "body": [ { "commentStart": 421, "end": 0, "expression": { "commentStart": 421, "end": 0, "raw": "1", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } }, "start": 0, "type": "ExpressionStatement", "type": "ExpressionStatement" } ], "commentStart": 421, "end": 0, "start": 0 }, "type": "IfExpression", "type": "IfExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 438, "end": 0, "expression": { "arguments": [ { "commentStart": 445, "end": 0, "left": { "abs_path": false, "commentStart": 445, "end": 0, "name": { "commentStart": 445, "end": 0, "name": "d", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "==", "right": { "commentStart": 450, "end": 0, "raw": "2", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, { "commentStart": 453, "end": 0, "raw": "\"both branches of and are false makes the whole expression false\"", "start": 0, "type": "Literal", "type": "Literal", "value": "both branches of and are false makes the whole expression false" } ], "callee": { "abs_path": false, "commentStart": 438, "end": 0, "name": { "commentStart": 438, "end": 0, "name": "assert", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 438, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, "start": 0, "type": "ExpressionStatement", "type": "ExpressionStatement" } ], "commentStart": 0, "end": 0, "nonCodeMeta": { "nonCodeNodes": { "2": [ { "commentStart": 128, "end": 0, "start": 0, "type": "NonCodeNode", "value": { "type": "newLine" } } ], "5": [ { "commentStart": 257, "end": 0, "start": 0, "type": "NonCodeNode", "value": { "type": "newLine" } } ], "8": [ { "commentStart": 386, "end": 0, "start": 0, "type": "NonCodeNode", "value": { "type": "newLine" } } ] }, "startNodes": [] }, "start": 0 } }