---
source: kcl/src/simulation_tests.rs
description: Result of parsing boolean_logical_multiple.kcl
---
{
  "Ok": {
    "body": [
      {
        "declaration": {
          "end": 25,
          "id": {
            "end": 2,
            "name": "ii",
            "start": 0,
            "type": "Identifier"
          },
          "init": {
            "end": 25,
            "left": {
              "end": 9,
              "raw": "true",
              "start": 5,
              "type": "Literal",
              "type": "Literal",
              "value": true
            },
            "operator": "|",
            "right": {
              "end": 25,
              "left": {
                "end": 17,
                "raw": "false",
                "start": 12,
                "type": "Literal",
                "type": "Literal",
                "value": false
              },
              "operator": "&",
              "right": {
                "end": 25,
                "raw": "false",
                "start": 20,
                "type": "Literal",
                "type": "Literal",
                "value": false
              },
              "start": 12,
              "type": "BinaryExpression",
              "type": "BinaryExpression"
            },
            "start": 5,
            "type": "BinaryExpression",
            "type": "BinaryExpression"
          },
          "start": 0,
          "type": "VariableDeclarator"
        },
        "end": 25,
        "kind": "const",
        "start": 0,
        "type": "VariableDeclaration",
        "type": "VariableDeclaration"
      },
      {
        "declaration": {
          "end": 56,
          "id": {
            "end": 27,
            "name": "i",
            "start": 26,
            "type": "Identifier"
          },
          "init": {
            "cond": {
              "end": 35,
              "name": "ii",
              "start": 33,
              "type": "Identifier",
              "type": "Identifier"
            },
            "digest": null,
            "else_ifs": [],
            "end": 56,
            "final_else": {
              "body": [
                {
                  "end": 54,
                  "expression": {
                    "end": 54,
                    "raw": "2",
                    "start": 53,
                    "type": "Literal",
                    "type": "Literal",
                    "value": {
                      "value": 2.0,
                      "suffix": "None"
                    }
                  },
                  "start": 53,
                  "type": "ExpressionStatement",
                  "type": "ExpressionStatement"
                }
              ],
              "end": 55,
              "start": 53
            },
            "start": 30,
            "then_val": {
              "body": [
                {
                  "end": 41,
                  "expression": {
                    "end": 41,
                    "raw": "1",
                    "start": 40,
                    "type": "Literal",
                    "type": "Literal",
                    "value": {
                      "value": 1.0,
                      "suffix": "None"
                    }
                  },
                  "start": 40,
                  "type": "ExpressionStatement",
                  "type": "ExpressionStatement"
                }
              ],
              "end": 42,
              "start": 40
            },
            "type": "IfExpression",
            "type": "IfExpression"
          },
          "start": 26,
          "type": "VariableDeclarator"
        },
        "end": 56,
        "kind": "const",
        "start": 26,
        "type": "VariableDeclaration",
        "type": "VariableDeclaration"
      },
      {
        "end": 108,
        "expression": {
          "arguments": [
            {
              "end": 70,
              "left": {
                "end": 65,
                "name": "i",
                "start": 64,
                "type": "Identifier",
                "type": "Identifier"
              },
              "operator": "==",
              "right": {
                "end": 70,
                "raw": "1",
                "start": 69,
                "type": "Literal",
                "type": "Literal",
                "value": {
                  "value": 1.0,
                  "suffix": "None"
                }
              },
              "start": 64,
              "type": "BinaryExpression",
              "type": "BinaryExpression"
            },
            {
              "end": 107,
              "raw": "\"and has higher precedence than or\"",
              "start": 72,
              "type": "Literal",
              "type": "Literal",
              "value": "and has higher precedence than or"
            }
          ],
          "callee": {
            "end": 63,
            "name": "assert",
            "start": 57,
            "type": "Identifier"
          },
          "end": 108,
          "start": 57,
          "type": "CallExpression",
          "type": "CallExpression"
        },
        "start": 57,
        "type": "ExpressionStatement",
        "type": "ExpressionStatement"
      },
      {
        "declaration": {
          "end": 151,
          "id": {
            "end": 112,
            "name": "jj",
            "start": 110,
            "type": "Identifier"
          },
          "init": {
            "end": 151,
            "left": {
              "end": 136,
              "left": {
                "end": 120,
                "raw": "false",
                "start": 115,
                "type": "Literal",
                "type": "Literal",
                "value": false
              },
              "operator": "|",
              "right": {
                "end": 136,
                "left": {
                  "end": 127,
                  "raw": "true",
                  "start": 123,
                  "type": "Literal",
                  "type": "Literal",
                  "value": true
                },
                "operator": "&",
                "right": {
                  "argument": {
                    "end": 136,
                    "raw": "false",
                    "start": 131,
                    "type": "Literal",
                    "type": "Literal",
                    "value": false
                  },
                  "end": 136,
                  "operator": "!",
                  "start": 130,
                  "type": "UnaryExpression",
                  "type": "UnaryExpression"
                },
                "start": 123,
                "type": "BinaryExpression",
                "type": "BinaryExpression"
              },
              "start": 115,
              "type": "BinaryExpression",
              "type": "BinaryExpression"
            },
            "operator": "|",
            "right": {
              "end": 151,
              "left": {
                "end": 144,
                "raw": "false",
                "start": 139,
                "type": "Literal",
                "type": "Literal",
                "value": false
              },
              "operator": "&",
              "right": {
                "end": 151,
                "raw": "true",
                "start": 147,
                "type": "Literal",
                "type": "Literal",
                "value": true
              },
              "start": 139,
              "type": "BinaryExpression",
              "type": "BinaryExpression"
            },
            "start": 115,
            "type": "BinaryExpression",
            "type": "BinaryExpression"
          },
          "start": 110,
          "type": "VariableDeclarator"
        },
        "end": 151,
        "kind": "const",
        "start": 110,
        "type": "VariableDeclaration",
        "type": "VariableDeclaration"
      },
      {
        "declaration": {
          "end": 182,
          "id": {
            "end": 153,
            "name": "j",
            "start": 152,
            "type": "Identifier"
          },
          "init": {
            "cond": {
              "end": 161,
              "name": "jj",
              "start": 159,
              "type": "Identifier",
              "type": "Identifier"
            },
            "digest": null,
            "else_ifs": [],
            "end": 182,
            "final_else": {
              "body": [
                {
                  "end": 180,
                  "expression": {
                    "end": 180,
                    "raw": "2",
                    "start": 179,
                    "type": "Literal",
                    "type": "Literal",
                    "value": {
                      "value": 2.0,
                      "suffix": "None"
                    }
                  },
                  "start": 179,
                  "type": "ExpressionStatement",
                  "type": "ExpressionStatement"
                }
              ],
              "end": 181,
              "start": 179
            },
            "start": 156,
            "then_val": {
              "body": [
                {
                  "end": 167,
                  "expression": {
                    "end": 167,
                    "raw": "1",
                    "start": 166,
                    "type": "Literal",
                    "type": "Literal",
                    "value": {
                      "value": 1.0,
                      "suffix": "None"
                    }
                  },
                  "start": 166,
                  "type": "ExpressionStatement",
                  "type": "ExpressionStatement"
                }
              ],
              "end": 168,
              "start": 166
            },
            "type": "IfExpression",
            "type": "IfExpression"
          },
          "start": 152,
          "type": "VariableDeclarator"
        },
        "end": 182,
        "kind": "const",
        "start": 152,
        "type": "VariableDeclaration",
        "type": "VariableDeclaration"
      },
      {
        "end": 227,
        "expression": {
          "arguments": [
            {
              "end": 196,
              "left": {
                "end": 191,
                "name": "j",
                "start": 190,
                "type": "Identifier",
                "type": "Identifier"
              },
              "operator": "==",
              "right": {
                "end": 196,
                "raw": "1",
                "start": 195,
                "type": "Literal",
                "type": "Literal",
                "value": {
                  "value": 1.0,
                  "suffix": "None"
                }
              },
              "start": 190,
              "type": "BinaryExpression",
              "type": "BinaryExpression"
            },
            {
              "end": 226,
              "raw": "\"multiple logical operators\"",
              "start": 198,
              "type": "Literal",
              "type": "Literal",
              "value": "multiple logical operators"
            }
          ],
          "callee": {
            "end": 189,
            "name": "assert",
            "start": 183,
            "type": "Identifier"
          },
          "end": 227,
          "start": 183,
          "type": "CallExpression",
          "type": "CallExpression"
        },
        "start": 183,
        "type": "ExpressionStatement",
        "type": "ExpressionStatement"
      }
    ],
    "end": 228,
    "nonCodeMeta": {
      "nonCodeNodes": {
        "2": [
          {
            "end": 110,
            "start": 108,
            "type": "NonCodeNode",
            "value": {
              "type": "newLine"
            }
          }
        ]
      },
      "startNodes": []
    },
    "start": 0
  }
}
