nashorn/test/script/nosecurity/treeapi/switch.js.EXPECTED
author hannesw
Wed, 27 Apr 2016 15:50:33 +0200
changeset 37732 3673fec68d16
parent 29543 4d9f8f8b69a4
permissions -rw-r--r--
8134503: support ES6 parsing in Nashorn Reviewed-by: jlaskey, sundar, mhaupt Contributed-by: andreas.woess@oracle.com

[
  {
    "cases": [],
    "expression": {
      "endPosition": "12",
      "kind": "IDENTIFIER",
      "name": "key",
      "startPosition": "9"
    },
    "endPosition": "16",
    "kind": "SWITCH",
    "startPosition": "1"
  },
  {
    "cases": [
      {
        "expression": {
          "endPosition": "43",
          "kind": "NUMBER_LITERAL",
          "value": "2",
          "startPosition": "42"
        },
        "endPosition": "64",
        "kind": "CASE",
        "statements": [
          {
            "expression": {
              "endPosition": "52",
              "kind": "FUNCTION_INVOCATION",
              "functionSelect": {
                "endPosition": "50",
                "kind": "IDENTIFIER",
                "name": "hello",
                "startPosition": "45"
              },
              "arguments": [],
              "startPosition": "45"
            },
            "endPosition": "52",
            "kind": "EXPRESSION_STATEMENT",
            "startPosition": "45"
          },
          {
            "endPosition": "64",
            "kind": "BREAK",
            "label": "null",
            "startPosition": "58"
          }
        ],
        "startPosition": "37"
      }
    ],
    "expression": {
      "endPosition": "29",
      "kind": "IDENTIFIER",
      "name": "key",
      "startPosition": "26"
    },
    "endPosition": "66",
    "kind": "SWITCH",
    "startPosition": "18"
  },
  {
    "cases": [
      {
        "expression": {
          "endPosition": "93",
          "kind": "NUMBER_LITERAL",
          "value": "4",
          "startPosition": "92"
        },
        "endPosition": "110",
        "kind": "CASE",
        "statements": [
          {
            "expression": {
              "endPosition": "102",
              "kind": "FUNCTION_INVOCATION",
              "functionSelect": {
                "endPosition": "100",
                "kind": "IDENTIFIER",
                "name": "hello",
                "startPosition": "95"
              },
              "arguments": [],
              "startPosition": "95"
            },
            "endPosition": "102",
            "kind": "EXPRESSION_STATEMENT",
            "startPosition": "95"
          },
          {
            "endPosition": "110",
            "kind": "BREAK",
            "label": "null",
            "startPosition": "104"
          }
        ],
        "startPosition": "87"
      },
      {
        "expression": {
          "endPosition": "121",
          "kind": "NUMBER_LITERAL",
          "value": "2",
          "startPosition": "120"
        },
        "endPosition": "138",
        "kind": "CASE",
        "statements": [
          {
            "expression": {
              "endPosition": "130",
              "kind": "FUNCTION_INVOCATION",
              "functionSelect": {
                "endPosition": "128",
                "kind": "IDENTIFIER",
                "name": "world",
                "startPosition": "123"
              },
              "arguments": [],
              "startPosition": "123"
            },
            "endPosition": "130",
            "kind": "EXPRESSION_STATEMENT",
            "startPosition": "123"
          },
          {
            "endPosition": "138",
            "kind": "BREAK",
            "label": "null",
            "startPosition": "132"
          }
        ],
        "startPosition": "115"
      },
      {
        "expression": "null",
        "endPosition": "157",
        "kind": "CASE",
        "statements": [
          {
            "endPosition": "157",
            "kind": "BREAK",
            "label": "null",
            "startPosition": "152"
          }
        ],
        "startPosition": "143"
      }
    ],
    "expression": {
      "endPosition": "79",
      "kind": "IDENTIFIER",
      "name": "key",
      "startPosition": "76"
    },
    "endPosition": "159",
    "kind": "SWITCH",
    "startPosition": "68"
  }
]