|
@@ -1,20238 +0,0 @@
|
|
|
-/*
|
|
|
- Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
|
|
|
- Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
|
|
|
- Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
|
|
|
- Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
|
|
|
- Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>
|
|
|
- Copyright (C) 2011 Yusuke Suzuki <utatane.tea@gmail.com>
|
|
|
- Copyright (C) 2011 Arpad Borsos <arpad.borsos@googlemail.com>
|
|
|
-
|
|
|
- Redistribution and use in source and binary forms, with or without
|
|
|
- modification, are permitted provided that the following conditions are met:
|
|
|
-
|
|
|
- * Redistributions of source code must retain the above copyright
|
|
|
- notice, this list of conditions and the following disclaimer.
|
|
|
- * Redistributions in binary form must reproduce the above copyright
|
|
|
- notice, this list of conditions and the following disclaimer in the
|
|
|
- documentation and/or other materials provided with the distribution.
|
|
|
-
|
|
|
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
|
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
|
|
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
-*/
|
|
|
-
|
|
|
-var testFixture = {
|
|
|
-
|
|
|
- 'Primary Expression': {
|
|
|
-
|
|
|
- 'this\n': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'ThisExpression',
|
|
|
- range: [0, 4],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 4 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 2, column: 0 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 2, column: 0 }
|
|
|
- },
|
|
|
- tokens: [{
|
|
|
- type: 'Keyword',
|
|
|
- value: 'this',
|
|
|
- range: [0, 4],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 4 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- 'null\n': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: null,
|
|
|
- raw: 'null',
|
|
|
- range: [0, 4],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 4 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 2, column: 0 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 2, column: 0 }
|
|
|
- },
|
|
|
- tokens: [{
|
|
|
- type: 'Null',
|
|
|
- value: 'null',
|
|
|
- range: [0, 4],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 4 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '\n 42\n\n': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [5, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [5, 9],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 4, column: 0 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [5, 9],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 4, column: 0 }
|
|
|
- },
|
|
|
- tokens: [{
|
|
|
- type: 'Numeric',
|
|
|
- value: '42',
|
|
|
- range: [5, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '(1 + 2 ) * 3': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'BinaryExpression',
|
|
|
- operator: '*',
|
|
|
- left: {
|
|
|
- type: 'BinaryExpression',
|
|
|
- operator: '+',
|
|
|
- left: {
|
|
|
- type: 'Literal',
|
|
|
- value: 1,
|
|
|
- raw: '1',
|
|
|
- range: [1, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 1 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'Literal',
|
|
|
- value: 2,
|
|
|
- raw: '2',
|
|
|
- range: [5, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 5 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [1, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 1 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'Literal',
|
|
|
- value: 3,
|
|
|
- raw: '3',
|
|
|
- range: [11, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 11 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- 'Grouping Operator': {
|
|
|
-
|
|
|
- '(1) + (2 ) + 3': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'BinaryExpression',
|
|
|
- operator: '+',
|
|
|
- left: {
|
|
|
- type: 'BinaryExpression',
|
|
|
- operator: '+',
|
|
|
- left: {
|
|
|
- type: 'Literal',
|
|
|
- value: 1,
|
|
|
- raw: '1',
|
|
|
- range: [1, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 1 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'Literal',
|
|
|
- value: 2,
|
|
|
- raw: '2',
|
|
|
- range: [7, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 7 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'Literal',
|
|
|
- value: 3,
|
|
|
- raw: '3',
|
|
|
- range: [14, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 14 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '4 + 5 << (6)': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'BinaryExpression',
|
|
|
- operator: '<<',
|
|
|
- left: {
|
|
|
- type: 'BinaryExpression',
|
|
|
- operator: '+',
|
|
|
- left: {
|
|
|
- type: 'Literal',
|
|
|
- value: 4,
|
|
|
- raw: '4',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'Literal',
|
|
|
- value: 5,
|
|
|
- raw: '5',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'Literal',
|
|
|
- value: 6,
|
|
|
- raw: '6',
|
|
|
- range: [10, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- 'Array Initializer': {
|
|
|
-
|
|
|
- 'x = []': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ArrayExpression',
|
|
|
- elements: [],
|
|
|
- range: [4, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- },
|
|
|
- tokens: [{
|
|
|
- type: 'Identifier',
|
|
|
- value: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Punctuator',
|
|
|
- value: '=',
|
|
|
- range: [2, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 2 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Punctuator',
|
|
|
- value: '[',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Punctuator',
|
|
|
- value: ']',
|
|
|
- range: [5, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 5 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- 'x = [ ]': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ArrayExpression',
|
|
|
- elements: [],
|
|
|
- range: [4, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = [ 42 ]': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ArrayExpression',
|
|
|
- elements: [{
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [6, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = [ 42, ]': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ArrayExpression',
|
|
|
- elements: [{
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [6, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = [ ,, 42 ]': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ArrayExpression',
|
|
|
- elements: [
|
|
|
- null,
|
|
|
- null,
|
|
|
- {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [9, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = [ 1, 2, 3, ]': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ArrayExpression',
|
|
|
- elements: [{
|
|
|
- type: 'Literal',
|
|
|
- value: 1,
|
|
|
- raw: '1',
|
|
|
- range: [6, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Literal',
|
|
|
- value: 2,
|
|
|
- raw: '2',
|
|
|
- range: [9, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Literal',
|
|
|
- value: 3,
|
|
|
- raw: '3',
|
|
|
- range: [12, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 12 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = [ 1, 2,, 3, ]': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ArrayExpression',
|
|
|
- elements: [{
|
|
|
- type: 'Literal',
|
|
|
- value: 1,
|
|
|
- raw: '1',
|
|
|
- range: [6, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Literal',
|
|
|
- value: 2,
|
|
|
- raw: '2',
|
|
|
- range: [9, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- }, null, {
|
|
|
- type: 'Literal',
|
|
|
- value: 3,
|
|
|
- raw: '3',
|
|
|
- range: [13, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 13 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '日本語 = []': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: '日本語',
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ArrayExpression',
|
|
|
- elements: [],
|
|
|
- range: [6, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'T\u203F = []': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'T\u203F',
|
|
|
- range: [0, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ArrayExpression',
|
|
|
- elements: [],
|
|
|
- range: [5, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 5 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'T\u200C = []': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'T\u200C',
|
|
|
- range: [0, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ArrayExpression',
|
|
|
- elements: [],
|
|
|
- range: [5, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 5 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'T\u200D = []': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'T\u200D',
|
|
|
- range: [0, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ArrayExpression',
|
|
|
- elements: [],
|
|
|
- range: [5, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 5 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '\u2163\u2161 = []': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: '\u2163\u2161',
|
|
|
- range: [0, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ArrayExpression',
|
|
|
- elements: [],
|
|
|
- range: [5, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 5 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '\u2163\u2161\u200A=\u2009[]': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: '\u2163\u2161',
|
|
|
- range: [0, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ArrayExpression',
|
|
|
- elements: [],
|
|
|
- range: [5, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 5 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- 'Object Initializer': {
|
|
|
-
|
|
|
- 'x = {}': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [],
|
|
|
- range: [4, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [],
|
|
|
- range: [4, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { answer: 42 }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'answer',
|
|
|
- range: [6, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [14, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 14 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'init',
|
|
|
- range: [6, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { if: 42 }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'if',
|
|
|
- range: [6, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [10, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'init',
|
|
|
- range: [6, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { true: 42 }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'true',
|
|
|
- range: [6, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [12, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 12 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'init',
|
|
|
- range: [6, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { false: 42 }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'false',
|
|
|
- range: [6, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [13, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 13 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'init',
|
|
|
- range: [6, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { null: 42 }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'null',
|
|
|
- range: [6, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [12, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 12 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'init',
|
|
|
- range: [6, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { "answer": 42 }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'answer',
|
|
|
- raw: '"answer"',
|
|
|
- range: [6, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [16, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 16 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'init',
|
|
|
- range: [6, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 20],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 20 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 20],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 20 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 20],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 20 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { x: 1, x: 2 }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [
|
|
|
- {
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [6, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'Literal',
|
|
|
- value: 1,
|
|
|
- raw: '1',
|
|
|
- range: [9, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'init',
|
|
|
- range: [6, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [12, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 12 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'Literal',
|
|
|
- value: 2,
|
|
|
- raw: '2',
|
|
|
- range: [15, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 15 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'init',
|
|
|
- range: [12, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 12 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- }
|
|
|
- ],
|
|
|
- range: [4, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { get width() { return m_width } }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'width',
|
|
|
- range: [10, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [{
|
|
|
- type: 'ReturnStatement',
|
|
|
- argument: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'm_width',
|
|
|
- range: [27, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 27 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [20, 35],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 20 },
|
|
|
- end: { line: 1, column: 35 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [18, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 36 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [18, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 36 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'get',
|
|
|
- range: [6, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 36 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 38],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 38 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 38],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 38 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 38],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 38 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { get undef() {} }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'undef',
|
|
|
- range: [10, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [],
|
|
|
- range: [18, 20],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 20 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [18, 20],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 20 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'get',
|
|
|
- range: [6, 20],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 20 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { get if() {} }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'if',
|
|
|
- range: [10, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [],
|
|
|
- range: [15, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 15 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [15, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 15 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'get',
|
|
|
- range: [6, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 19 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 19 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 19 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { get true() {} }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'true',
|
|
|
- range: [10, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [],
|
|
|
- range: [17, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 17 },
|
|
|
- end: { line: 1, column: 19 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [17, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 17 },
|
|
|
- end: { line: 1, column: 19 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'get',
|
|
|
- range: [6, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 19 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { get false() {} }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'false',
|
|
|
- range: [10, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [],
|
|
|
- range: [18, 20],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 20 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [18, 20],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 20 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'get',
|
|
|
- range: [6, 20],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 20 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { get null() {} }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'null',
|
|
|
- range: [10, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [],
|
|
|
- range: [17, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 17 },
|
|
|
- end: { line: 1, column: 19 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [17, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 17 },
|
|
|
- end: { line: 1, column: 19 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'get',
|
|
|
- range: [6, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 19 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { get "undef"() {} }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'undef',
|
|
|
- raw: '"undef"',
|
|
|
- range: [10, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [],
|
|
|
- range: [20, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 20 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [20, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 20 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'get',
|
|
|
- range: [6, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 24],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 24 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 24],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 24 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 24],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 24 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { get 10() {} }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Literal',
|
|
|
- value: 10,
|
|
|
- raw: '10',
|
|
|
- range: [10, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [],
|
|
|
- range: [15, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 15 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [15, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 15 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'get',
|
|
|
- range: [6, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 19 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 19 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 19 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { set width(w) { m_width = w } }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'width',
|
|
|
- range: [10, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [{
|
|
|
- type: 'Identifier',
|
|
|
- name: 'w',
|
|
|
- range: [16, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 16 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- }],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'm_width',
|
|
|
- range: [21, 28],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 21 },
|
|
|
- end: { line: 1, column: 28 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'w',
|
|
|
- range: [31, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 31 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [21, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 21 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [21, 33],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 21 },
|
|
|
- end: { line: 1, column: 33 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [19, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 19 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [19, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 19 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'set',
|
|
|
- range: [6, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 36 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 36 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 36 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { set if(w) { m_if = w } }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'if',
|
|
|
- range: [10, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [{
|
|
|
- type: 'Identifier',
|
|
|
- name: 'w',
|
|
|
- range: [13, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 13 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- }],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'm_if',
|
|
|
- range: [18, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'w',
|
|
|
- range: [25, 26],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 25 },
|
|
|
- end: { line: 1, column: 26 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [18, 26],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 26 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [18, 27],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 27 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [16, 28],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 16 },
|
|
|
- end: { line: 1, column: 28 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [16, 28],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 16 },
|
|
|
- end: { line: 1, column: 28 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'set',
|
|
|
- range: [6, 28],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 28 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 30],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 30 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 30],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 30 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 30],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 30 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { set true(w) { m_true = w } }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'true',
|
|
|
- range: [10, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [{
|
|
|
- type: 'Identifier',
|
|
|
- name: 'w',
|
|
|
- range: [15, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 15 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- }],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'm_true',
|
|
|
- range: [20, 26],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 20 },
|
|
|
- end: { line: 1, column: 26 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'w',
|
|
|
- range: [29, 30],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 29 },
|
|
|
- end: { line: 1, column: 30 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [20, 30],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 20 },
|
|
|
- end: { line: 1, column: 30 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [20, 31],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 20 },
|
|
|
- end: { line: 1, column: 31 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [18, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [18, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'set',
|
|
|
- range: [6, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { set false(w) { m_false = w } }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'false',
|
|
|
- range: [10, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [{
|
|
|
- type: 'Identifier',
|
|
|
- name: 'w',
|
|
|
- range: [16, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 16 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- }],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'm_false',
|
|
|
- range: [21, 28],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 21 },
|
|
|
- end: { line: 1, column: 28 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'w',
|
|
|
- range: [31, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 31 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [21, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 21 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [21, 33],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 21 },
|
|
|
- end: { line: 1, column: 33 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [19, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 19 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [19, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 19 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'set',
|
|
|
- range: [6, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 36 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 36 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 36 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { set null(w) { m_null = w } }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'null',
|
|
|
- range: [10, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [{
|
|
|
- type: 'Identifier',
|
|
|
- name: 'w',
|
|
|
- range: [15, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 15 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- }],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'm_null',
|
|
|
- range: [20, 26],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 20 },
|
|
|
- end: { line: 1, column: 26 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'w',
|
|
|
- range: [29, 30],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 29 },
|
|
|
- end: { line: 1, column: 30 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [20, 30],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 20 },
|
|
|
- end: { line: 1, column: 30 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [20, 31],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 20 },
|
|
|
- end: { line: 1, column: 31 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [18, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [18, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'set',
|
|
|
- range: [6, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { set "null"(w) { m_null = w } }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'null',
|
|
|
- raw: '"null"',
|
|
|
- range: [10, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [{
|
|
|
- type: 'Identifier',
|
|
|
- name: 'w',
|
|
|
- range: [17, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 17 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- }],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'm_null',
|
|
|
- range: [22, 28],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 22 },
|
|
|
- end: { line: 1, column: 28 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'w',
|
|
|
- range: [31, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 31 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [22, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 22 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [22, 33],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 22 },
|
|
|
- end: { line: 1, column: 33 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [20, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 20 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [20, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 20 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'set',
|
|
|
- range: [6, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 34 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 36 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 36 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 36 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { set 10(w) { m_null = w } }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Literal',
|
|
|
- value: 10,
|
|
|
- raw: '10',
|
|
|
- range: [10, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'FunctionExpression',
|
|
|
- id: null,
|
|
|
- params: [{
|
|
|
- type: 'Identifier',
|
|
|
- name: 'w',
|
|
|
- range: [13, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 13 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- }],
|
|
|
- defaults: [],
|
|
|
- body: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'm_null',
|
|
|
- range: [18, 24],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 24 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'w',
|
|
|
- range: [27, 28],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 27 },
|
|
|
- end: { line: 1, column: 28 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [18, 28],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 28 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [18, 29],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 29 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [16, 30],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 16 },
|
|
|
- end: { line: 1, column: 30 }
|
|
|
- }
|
|
|
- },
|
|
|
- rest: null,
|
|
|
- generator: false,
|
|
|
- expression: false,
|
|
|
- range: [16, 30],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 16 },
|
|
|
- end: { line: 1, column: 30 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'set',
|
|
|
- range: [6, 30],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 30 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { get: 42 }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'get',
|
|
|
- range: [6, 9],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 9 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [11, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 11 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'init',
|
|
|
- range: [6, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'x = { set: 43 }': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'AssignmentExpression',
|
|
|
- operator: '=',
|
|
|
- left: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- right: {
|
|
|
- type: 'ObjectExpression',
|
|
|
- properties: [{
|
|
|
- type: 'Property',
|
|
|
- key: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'set',
|
|
|
- range: [6, 9],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 9 }
|
|
|
- }
|
|
|
- },
|
|
|
- value: {
|
|
|
- type: 'Literal',
|
|
|
- value: 43,
|
|
|
- raw: '43',
|
|
|
- range: [11, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 11 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
- kind: 'init',
|
|
|
- range: [6, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- 'Comments': {
|
|
|
-
|
|
|
- '/* block comment */ 42': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [20, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 20 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [20, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 20 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '42 /*The*/ /*Answer*/': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [0, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Block',
|
|
|
- value: 'The',
|
|
|
- range: [3, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 3 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Block',
|
|
|
- value: 'Answer',
|
|
|
- range: [11, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 11 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '42 /*the*/ /*answer*/': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [0, 2]
|
|
|
- },
|
|
|
- range: [0, 21]
|
|
|
- }],
|
|
|
- range: [0, 21],
|
|
|
- comments: [{
|
|
|
- type: 'Block',
|
|
|
- value: 'the',
|
|
|
- range: [3, 10]
|
|
|
- }, {
|
|
|
- type: 'Block',
|
|
|
- value: 'answer',
|
|
|
- range: [11, 21]
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '/* multiline\ncomment\nshould\nbe\nignored */ 42': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [42, 44],
|
|
|
- loc: {
|
|
|
- start: { line: 5, column: 11 },
|
|
|
- end: { line: 5, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [42, 44],
|
|
|
- loc: {
|
|
|
- start: { line: 5, column: 11 },
|
|
|
- end: { line: 5, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '/*a\r\nb*/ 42': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [9, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [9, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [9, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Block',
|
|
|
- value: 'a\r\nb',
|
|
|
- range: [0, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 2, column: 3 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '/*a\rb*/ 42': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [8, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [8, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [8, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Block',
|
|
|
- value: 'a\rb',
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 2, column: 3 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '/*a\nb*/ 42': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [8, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [8, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [8, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Block',
|
|
|
- value: 'a\nb',
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 2, column: 3 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '/*a\nc*/ 42': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- }
|
|
|
- }],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 4 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Block',
|
|
|
- value: 'a\nc',
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 2, column: 3 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '// line comment\n42': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [16, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 0 },
|
|
|
- end: { line: 2, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [16, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 0 },
|
|
|
- end: { line: 2, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '42 // line comment': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [0, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Line',
|
|
|
- value: ' line comment',
|
|
|
- range: [3, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 3 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '// Hello, world!\n42': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [17, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 0 },
|
|
|
- end: { line: 2, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [17, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 0 },
|
|
|
- end: { line: 2, column: 2 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [17, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 0 },
|
|
|
- end: { line: 2, column: 2 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Line',
|
|
|
- value: ' Hello, world!',
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '// Hello, world!\n': {
|
|
|
- type: 'Program',
|
|
|
- body: [],
|
|
|
- range: [17, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 0 },
|
|
|
- end: { line: 2, column: 0 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Line',
|
|
|
- value: ' Hello, world!',
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '// Hallo, world!\n': {
|
|
|
- type: 'Program',
|
|
|
- body: [],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 0 },
|
|
|
- end: { line: 2, column: 0 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Line',
|
|
|
- value: ' Hallo, world!',
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '//\n42': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [3, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 0 },
|
|
|
- end: { line: 2, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [3, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 0 },
|
|
|
- end: { line: 2, column: 2 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [3, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 0 },
|
|
|
- end: { line: 2, column: 2 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Line',
|
|
|
- value: '',
|
|
|
- range: [0, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '//': {
|
|
|
- type: 'Program',
|
|
|
- body: [],
|
|
|
- range: [2, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 2 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Line',
|
|
|
- value: '',
|
|
|
- range: [0, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '// ': {
|
|
|
- type: 'Program',
|
|
|
- body: [],
|
|
|
- range: [3, 3],
|
|
|
- comments: [{
|
|
|
- type: 'Line',
|
|
|
- value: ' ',
|
|
|
- range: [0, 3]
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '/**/42': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [4, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [4, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [4, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Block',
|
|
|
- value: '',
|
|
|
- range: [0, 4],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 4 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '// Hello, world!\n\n// Another hello\n42': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [37, 39],
|
|
|
- loc: {
|
|
|
- start: { line: 4, column: 0 },
|
|
|
- end: { line: 4, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [37, 39],
|
|
|
- loc: {
|
|
|
- start: { line: 4, column: 0 },
|
|
|
- end: { line: 4, column: 2 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [37, 39],
|
|
|
- loc: {
|
|
|
- start: { line: 4, column: 0 },
|
|
|
- end: { line: 4, column: 2 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Line',
|
|
|
- value: ' Hello, world!',
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Line',
|
|
|
- value: ' Another hello',
|
|
|
- range: [18, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 3, column: 0 },
|
|
|
- end: { line: 3, column: 18 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- 'if (x) { // Some comment\ndoThat(); }': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'IfStatement',
|
|
|
- test: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- consequent: {
|
|
|
- type: 'BlockStatement',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'CallExpression',
|
|
|
- callee: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'doThat',
|
|
|
- range: [25, 31],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 0 },
|
|
|
- end: { line: 2, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [25, 33],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 0 },
|
|
|
- end: { line: 2, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [25, 34],
|
|
|
- loc: {
|
|
|
- start: { line: 2, column: 0 },
|
|
|
- end: { line: 2, column: 9 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [7, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 7 },
|
|
|
- end: { line: 2, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
- alternate: null,
|
|
|
- range: [0, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 2, column: 11 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 36],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 2, column: 11 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Line',
|
|
|
- value: ' Some comment',
|
|
|
- range: [9, 24],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 24 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- 'switch (answer) { case 42: /* perfect */ bingo() }': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'SwitchStatement',
|
|
|
- discriminant: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'answer',
|
|
|
- range: [8, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- cases: [{
|
|
|
- type: 'SwitchCase',
|
|
|
- test: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [23, 25],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 23 },
|
|
|
- end: { line: 1, column: 25 }
|
|
|
- }
|
|
|
- },
|
|
|
- consequent: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'CallExpression',
|
|
|
- callee: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'bingo',
|
|
|
- range: [41, 46],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 41 },
|
|
|
- end: { line: 1, column: 46 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [41, 48],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 41 },
|
|
|
- end: { line: 1, column: 48 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [41, 49],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 41 },
|
|
|
- end: { line: 1, column: 49 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [18, 49],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 49 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 50],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 50 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 50],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 50 }
|
|
|
- },
|
|
|
- comments: [{
|
|
|
- type: 'Block',
|
|
|
- value: ' perfect ',
|
|
|
- range: [27, 40],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 27 },
|
|
|
- end: { line: 1, column: 40 }
|
|
|
- }
|
|
|
- }]
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- 'Numeric Literals': {
|
|
|
-
|
|
|
- '0': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 0,
|
|
|
- raw: '0',
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 1],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '42': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [0, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '3': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 3,
|
|
|
- raw: '3',
|
|
|
- range: [0, 1]
|
|
|
- },
|
|
|
- range: [0, 1]
|
|
|
- }],
|
|
|
- range: [0, 1],
|
|
|
- tokens: [{
|
|
|
- type: 'Numeric',
|
|
|
- value: '3',
|
|
|
- range: [0, 1]
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '5': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 5,
|
|
|
- raw: '5',
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- },
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- }],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- },
|
|
|
- tokens: [{
|
|
|
- type: 'Numeric',
|
|
|
- value: '5',
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 1 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- '.14': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 0.14,
|
|
|
- raw: '.14',
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '3.14159': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 3.14159,
|
|
|
- raw: '3.14159',
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '6.02214179e+23': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 6.02214179e+23,
|
|
|
- raw: '6.02214179e+23',
|
|
|
- range: [0, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '1.492417830e-10': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 1.49241783e-10,
|
|
|
- raw: '1.492417830e-10',
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '0x0': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 0,
|
|
|
- raw: '0x0',
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '0e+100': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 0,
|
|
|
- raw: '0e+100',
|
|
|
- range: [0, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '0xabc': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 0xabc,
|
|
|
- raw: '0xabc',
|
|
|
- range: [0, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '0xdef': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 0xdef,
|
|
|
- raw: '0xdef',
|
|
|
- range: [0, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '0X1A': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 0x1A,
|
|
|
- raw: '0X1A',
|
|
|
- range: [0, 4],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 4 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 4],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 4 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '0x10': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 0x10,
|
|
|
- raw: '0x10',
|
|
|
- range: [0, 4],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 4 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 4],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 4 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '0x100': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 0x100,
|
|
|
- raw: '0x100',
|
|
|
- range: [0, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '0X04': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 0X04,
|
|
|
- raw: '0X04',
|
|
|
- range: [0, 4],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 4 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 4],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 4 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '02': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 2,
|
|
|
- raw: '02',
|
|
|
- range: [0, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 2],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 2 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '012': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 10,
|
|
|
- raw: '012',
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '0012': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 10,
|
|
|
- raw: '0012',
|
|
|
- range: [0, 4],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 4 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 4],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 4 }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- 'String Literals': {
|
|
|
-
|
|
|
- '"Hello"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'Hello',
|
|
|
- raw: '"Hello"',
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"\\n\\r\\t\\v\\b\\f\\\\\\\'\\"\\0"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: '\n\r\t\x0B\b\f\\\'"\x00',
|
|
|
- raw: '"\\n\\r\\t\\v\\b\\f\\\\\\\'\\"\\0"',
|
|
|
- range: [0, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"\\u0061"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'a',
|
|
|
- raw: '"\\u0061"',
|
|
|
- range: [0, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"\\x61"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'a',
|
|
|
- raw: '"\\x61"',
|
|
|
- range: [0, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"\\u00"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'u00',
|
|
|
- raw: '"\\u00"',
|
|
|
- range: [0, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 6],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 6 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"\\xt"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'xt',
|
|
|
- raw: '"\\xt"',
|
|
|
- range: [0, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"Hello\\nworld"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'Hello\nworld',
|
|
|
- raw: '"Hello\\nworld"',
|
|
|
- range: [0, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"Hello\\\nworld"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'Helloworld',
|
|
|
- raw: '"Hello\\\nworld"',
|
|
|
- range: [0, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 2, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 2, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"Hello\\02World"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'Hello\u0002World',
|
|
|
- raw: '"Hello\\02World"',
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"Hello\\012World"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'Hello\u000AWorld',
|
|
|
- raw: '"Hello\\012World"',
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"Hello\\122World"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'Hello\122World',
|
|
|
- raw: '"Hello\\122World"',
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"Hello\\0122World"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'Hello\u000A2World',
|
|
|
- raw: '"Hello\\0122World"',
|
|
|
- range: [0, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"Hello\\312World"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'Hello\u00CAWorld',
|
|
|
- raw: '"Hello\\312World"',
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"Hello\\412World"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'Hello\412World',
|
|
|
- raw: '"Hello\\412World"',
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"Hello\\812World"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'Hello812World',
|
|
|
- raw: '"Hello\\812World"',
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"Hello\\712World"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'Hello\712World',
|
|
|
- raw: '"Hello\\712World"',
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"Hello\\0World"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'Hello\u0000World',
|
|
|
- raw: '"Hello\\0World"',
|
|
|
- range: [0, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"Hello\\\r\nworld"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'Helloworld',
|
|
|
- raw: '"Hello\\\r\nworld"',
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 2, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 2, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '"Hello\\1World"': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'Literal',
|
|
|
- value: 'Hello\u0001World',
|
|
|
- raw: '"Hello\\1World"',
|
|
|
- range: [0, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'Regular Expression Literals': {
|
|
|
-
|
|
|
- 'var x = /[a-z]/i': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'VariableDeclaration',
|
|
|
- declarations: [{
|
|
|
- type: 'VariableDeclarator',
|
|
|
- id: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- init: {
|
|
|
- type: 'Literal',
|
|
|
- value: '/[a-z]/i',
|
|
|
- raw: '/[a-z]/i',
|
|
|
- range: [8, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [4, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- }],
|
|
|
- kind: 'var',
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- },
|
|
|
- tokens: [{
|
|
|
- type: 'Keyword',
|
|
|
- value: 'var',
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Identifier',
|
|
|
- value: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Punctuator',
|
|
|
- value: '=',
|
|
|
- range: [6, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'RegularExpression',
|
|
|
- value: '/[a-z]/i',
|
|
|
- range: [8, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- 'var x = /[x-z]/i': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'VariableDeclaration',
|
|
|
- declarations: [{
|
|
|
- type: 'VariableDeclarator',
|
|
|
- id: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [4, 5]
|
|
|
- },
|
|
|
- init: {
|
|
|
- type: 'Literal',
|
|
|
- value: '/[x-z]/i',
|
|
|
- raw: '/[x-z]/i',
|
|
|
- range: [8, 16]
|
|
|
- },
|
|
|
- range: [4, 16]
|
|
|
- }],
|
|
|
- kind: 'var',
|
|
|
- range: [0, 16]
|
|
|
- }],
|
|
|
- range: [0, 16],
|
|
|
- tokens: [{
|
|
|
- type: 'Keyword',
|
|
|
- value: 'var',
|
|
|
- range: [0, 3]
|
|
|
- }, {
|
|
|
- type: 'Identifier',
|
|
|
- value: 'x',
|
|
|
- range: [4, 5]
|
|
|
- }, {
|
|
|
- type: 'Punctuator',
|
|
|
- value: '=',
|
|
|
- range: [6, 7]
|
|
|
- }, {
|
|
|
- type: 'RegularExpression',
|
|
|
- value: '/[x-z]/i',
|
|
|
- range: [8, 16]
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- 'var x = /[a-c]/i': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'VariableDeclaration',
|
|
|
- declarations: [{
|
|
|
- type: 'VariableDeclarator',
|
|
|
- id: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- init: {
|
|
|
- type: 'Literal',
|
|
|
- value: '/[a-c]/i',
|
|
|
- raw: '/[a-c]/i',
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- }],
|
|
|
- kind: 'var',
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- }],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- },
|
|
|
- tokens: [{
|
|
|
- type: 'Keyword',
|
|
|
- value: 'var',
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Identifier',
|
|
|
- value: 'x',
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Punctuator',
|
|
|
- value: '=',
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'RegularExpression',
|
|
|
- value: '/[a-c]/i',
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- 'var x = /[P QR]/i': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'VariableDeclaration',
|
|
|
- declarations: [{
|
|
|
- type: 'VariableDeclarator',
|
|
|
- id: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- init: {
|
|
|
- type: 'Literal',
|
|
|
- value: '/[P QR]/i',
|
|
|
- raw: '/[P QR]/i',
|
|
|
- range: [8, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [4, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- }],
|
|
|
- kind: 'var',
|
|
|
- range: [0, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- },
|
|
|
- tokens: [{
|
|
|
- type: 'Keyword',
|
|
|
- value: 'var',
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Identifier',
|
|
|
- value: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Punctuator',
|
|
|
- value: '=',
|
|
|
- range: [6, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'RegularExpression',
|
|
|
- value: '/[P QR]/i',
|
|
|
- range: [8, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- 'var x = /[\\]/]/': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'VariableDeclaration',
|
|
|
- declarations: [{
|
|
|
- type: 'VariableDeclarator',
|
|
|
- id: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- init: {
|
|
|
- type: 'Literal',
|
|
|
- value: new RegExp('[\\]/]').toString(),
|
|
|
- raw: '/[\\]/]/',
|
|
|
- range: [8, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [4, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- }],
|
|
|
- kind: 'var',
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- },
|
|
|
- tokens: [{
|
|
|
- type: 'Keyword',
|
|
|
- value: 'var',
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Identifier',
|
|
|
- value: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Punctuator',
|
|
|
- value: '=',
|
|
|
- range: [6, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'RegularExpression',
|
|
|
- value: '/[\\]/]/',
|
|
|
- range: [8, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- 'var x = /foo\\/bar/': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'VariableDeclaration',
|
|
|
- declarations: [{
|
|
|
- type: 'VariableDeclarator',
|
|
|
- id: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- init: {
|
|
|
- type: 'Literal',
|
|
|
- value: '/foo\\/bar/',
|
|
|
- raw: '/foo\\/bar/',
|
|
|
- range: [8, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [4, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- }],
|
|
|
- kind: 'var',
|
|
|
- range: [0, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- },
|
|
|
- tokens: [{
|
|
|
- type: 'Keyword',
|
|
|
- value: 'var',
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Identifier',
|
|
|
- value: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Punctuator',
|
|
|
- value: '=',
|
|
|
- range: [6, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'RegularExpression',
|
|
|
- value: '/foo\\/bar/',
|
|
|
- range: [8, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- 'var x = /=([^=\\s])+/g': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'VariableDeclaration',
|
|
|
- declarations: [{
|
|
|
- type: 'VariableDeclarator',
|
|
|
- id: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- init: {
|
|
|
- type: 'Literal',
|
|
|
- value: '/=([^=\\s])+/g',
|
|
|
- raw: '/=([^=\\s])+/g',
|
|
|
- range: [8, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [4, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- }],
|
|
|
- kind: 'var',
|
|
|
- range: [0, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- },
|
|
|
- tokens: [{
|
|
|
- type: 'Keyword',
|
|
|
- value: 'var',
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Identifier',
|
|
|
- value: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Punctuator',
|
|
|
- value: '=',
|
|
|
- range: [6, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'RegularExpression',
|
|
|
- value: '/=([^=\\s])+/g',
|
|
|
- range: [8, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- 'var x = /[P QR]/\\u0067': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'VariableDeclaration',
|
|
|
- declarations: [{
|
|
|
- type: 'VariableDeclarator',
|
|
|
- id: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- init: {
|
|
|
- type: 'Literal',
|
|
|
- value: '/[P QR]/g',
|
|
|
- raw: '/[P QR]/\\u0067',
|
|
|
- range: [8, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [4, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- }],
|
|
|
- kind: 'var',
|
|
|
- range: [0, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- },
|
|
|
- tokens: [{
|
|
|
- type: 'Keyword',
|
|
|
- value: 'var',
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Identifier',
|
|
|
- value: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Punctuator',
|
|
|
- value: '=',
|
|
|
- range: [6, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'RegularExpression',
|
|
|
- value: '/[P QR]/\\u0067',
|
|
|
- range: [8, 22],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 22 }
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
-
|
|
|
- 'var x = /[P QR]/\\g': {
|
|
|
- type: 'Program',
|
|
|
- body: [{
|
|
|
- type: 'VariableDeclaration',
|
|
|
- declarations: [{
|
|
|
- type: 'VariableDeclarator',
|
|
|
- id: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- init: {
|
|
|
- type: 'Literal',
|
|
|
- value: '/[P QR]/g',
|
|
|
- raw: '/[P QR]/\\g',
|
|
|
- range: [8, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [4, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- }],
|
|
|
- kind: 'var',
|
|
|
- range: [0, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- },
|
|
|
- tokens: [{
|
|
|
- type: 'Keyword',
|
|
|
- value: 'var',
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Identifier',
|
|
|
- value: 'x',
|
|
|
- range: [4, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Punctuator',
|
|
|
- value: '=',
|
|
|
- range: [6, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'RegularExpression',
|
|
|
- value: '/[P QR]/\\g',
|
|
|
- range: [8, 18],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 18 }
|
|
|
- }
|
|
|
- }]
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- 'Left-Hand-Side Expression': {
|
|
|
-
|
|
|
- 'new Button': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'NewExpression',
|
|
|
- callee: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'Button',
|
|
|
- range: [4, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [0, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'new Button()': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'NewExpression',
|
|
|
- callee: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'Button',
|
|
|
- range: [4, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [0, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'new new foo': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'NewExpression',
|
|
|
- callee: {
|
|
|
- type: 'NewExpression',
|
|
|
- callee: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'foo',
|
|
|
- range: [8, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [4, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [0, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'new new foo()': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'NewExpression',
|
|
|
- callee: {
|
|
|
- type: 'NewExpression',
|
|
|
- callee: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'foo',
|
|
|
- range: [8, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [4, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [0, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'new foo().bar()': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'CallExpression',
|
|
|
- callee: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'NewExpression',
|
|
|
- callee: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'foo',
|
|
|
- range: [4, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [0, 9],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 9 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'bar',
|
|
|
- range: [10, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 10 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 15],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 15 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'new foo[bar]': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'NewExpression',
|
|
|
- callee: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: true,
|
|
|
- object: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'foo',
|
|
|
- range: [4, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'bar',
|
|
|
- range: [8, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [4, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [0, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'new foo.bar()': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'NewExpression',
|
|
|
- callee: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'foo',
|
|
|
- range: [4, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'bar',
|
|
|
- range: [8, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 8 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [4, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [0, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '( new foo).bar()': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'CallExpression',
|
|
|
- callee: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'NewExpression',
|
|
|
- callee: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'foo',
|
|
|
- range: [6, 9],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 9 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [2, 9],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 2 },
|
|
|
- end: { line: 1, column: 9 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'bar',
|
|
|
- range: [11, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 11 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 14],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 14 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 16],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 16 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'foo(bar, baz)': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'CallExpression',
|
|
|
- callee: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'foo',
|
|
|
- range: [0, 3],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 3 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [{
|
|
|
- type: 'Identifier',
|
|
|
- name: 'bar',
|
|
|
- range: [4, 7],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 4 },
|
|
|
- end: { line: 1, column: 7 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'baz',
|
|
|
- range: [9, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- '( foo )()': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'CallExpression',
|
|
|
- callee: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'foo',
|
|
|
- range: [5, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 5 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [],
|
|
|
- range: [0, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 13],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 13 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'universe.milkyway': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'universe',
|
|
|
- range: [0, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'milkyway',
|
|
|
- range: [9, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'universe.milkyway.solarsystem': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'universe',
|
|
|
- range: [0, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'milkyway',
|
|
|
- range: [9, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'solarsystem',
|
|
|
- range: [18, 29],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 29 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 29],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 29 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 29],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 29 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'universe.milkyway.solarsystem.Earth': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'universe',
|
|
|
- range: [0, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'milkyway',
|
|
|
- range: [9, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 17],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 17 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'solarsystem',
|
|
|
- range: [18, 29],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 18 },
|
|
|
- end: { line: 1, column: 29 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 29],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 29 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'Earth',
|
|
|
- range: [30, 35],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 30 },
|
|
|
- end: { line: 1, column: 35 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 35],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 35 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 35],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 35 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'universe[galaxyName, otherUselessName]': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: true,
|
|
|
- object: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'universe',
|
|
|
- range: [0, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'SequenceExpression',
|
|
|
- expressions: [{
|
|
|
- type: 'Identifier',
|
|
|
- name: 'galaxyName',
|
|
|
- range: [9, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 19 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'otherUselessName',
|
|
|
- range: [21, 37],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 21 },
|
|
|
- end: { line: 1, column: 37 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [9, 37],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 37 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 38],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 38 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 38],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 38 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'universe[galaxyName]': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: true,
|
|
|
- object: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'universe',
|
|
|
- range: [0, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'galaxyName',
|
|
|
- range: [9, 19],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 19 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 20],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 20 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 20],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 20 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'universe[42].galaxies': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: true,
|
|
|
- object: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'universe',
|
|
|
- range: [0, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [9, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'galaxies',
|
|
|
- range: [13, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 13 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'universe(42).galaxies': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'CallExpression',
|
|
|
- callee: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'universe',
|
|
|
- range: [0, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [{
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [9, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'galaxies',
|
|
|
- range: [13, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 13 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'universe(42).galaxies(14, 3, 77).milkyway': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'CallExpression',
|
|
|
- callee: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'CallExpression',
|
|
|
- callee: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'universe',
|
|
|
- range: [0, 8],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 8 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [{
|
|
|
- type: 'Literal',
|
|
|
- value: 42,
|
|
|
- raw: '42',
|
|
|
- range: [9, 11],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 9 },
|
|
|
- end: { line: 1, column: 11 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 12],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 12 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'galaxies',
|
|
|
- range: [13, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 13 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 21],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 21 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [{
|
|
|
- type: 'Literal',
|
|
|
- value: 14,
|
|
|
- raw: '14',
|
|
|
- range: [22, 24],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 22 },
|
|
|
- end: { line: 1, column: 24 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Literal',
|
|
|
- value: 3,
|
|
|
- raw: '3',
|
|
|
- range: [26, 27],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 26 },
|
|
|
- end: { line: 1, column: 27 }
|
|
|
- }
|
|
|
- }, {
|
|
|
- type: 'Literal',
|
|
|
- value: 77,
|
|
|
- raw: '77',
|
|
|
- range: [29, 31],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 29 },
|
|
|
- end: { line: 1, column: 31 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 32],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 32 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'milkyway',
|
|
|
- range: [33, 41],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 33 },
|
|
|
- end: { line: 1, column: 41 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 41],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 41 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 41],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 41 }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- 'earth.asia.Indonesia.prepareForElection(2014)': {
|
|
|
- type: 'ExpressionStatement',
|
|
|
- expression: {
|
|
|
- type: 'CallExpression',
|
|
|
- callee: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'MemberExpression',
|
|
|
- computed: false,
|
|
|
- object: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'earth',
|
|
|
- range: [0, 5],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 5 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'asia',
|
|
|
- range: [6, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 6 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 10],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 10 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'Indonesia',
|
|
|
- range: [11, 20],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 11 },
|
|
|
- end: { line: 1, column: 20 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 20],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 20 }
|
|
|
- }
|
|
|
- },
|
|
|
- property: {
|
|
|
- type: 'Identifier',
|
|
|
- name: 'prepareForElection',
|
|
|
- range: [21, 39],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 21 },
|
|
|
- end: { line: 1, column: 39 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 39],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 39 }
|
|
|
- }
|
|
|
- },
|
|
|
- 'arguments': [{
|
|
|
- type: 'Literal',
|
|
|
- value: 2014,
|
|
|
- raw: '2014',
|
|
|
- range: [40, 44],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 40 },
|
|
|
- end: { line: 1, column: 44 }
|
|
|
- }
|
|
|
- }],
|
|
|
- range: [0, 45],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 45 }
|
|
|
- }
|
|
|
- },
|
|
|
- range: [0, 45],
|
|
|
- loc: {
|
|
|
- start: { line: 1, column: 0 },
|
|
|
- end: { line: 1, column: 45 }
|
|
|
- }
|
|
|
- },
|
<