diff --git a/src/parser/expression.js b/src/parser/expression.js index 9bd456fd1a..96ce489e71 100644 --- a/src/parser/expression.js +++ b/src/parser/expression.js @@ -32,9 +32,17 @@ pp.checkPropClash = function (prop, propHash) { let key = prop.key, name; switch (key.type) { - case "Identifier": name = key.name; break; - case "Literal": name = String(key.value); break; - default: return; + case "Identifier": + name = key.name; + break; + + case "StringLiteral": + case "NumberLiteral": + name = String(key.value); + break; + + default: + return; } let kind = prop.kind; @@ -377,19 +385,28 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { case tt.regexp: let value = this.state.value; - node = this.parseLiteral(value.value); - node.regex = {pattern: value.pattern, flags: value.flags}; + node = this.parseLiteral(value.value, "RegexLiteral"); + node.pattern = value.pattern; + node.flags = value.flags; return node; - case tt.num: case tt.string: - return this.parseLiteral(this.state.value); + case tt.num: + return this.parseLiteral(this.state.value, "NumberLiteral"); - case tt._null: case tt._true: case tt._false: + case tt.string: + return this.parseLiteral(this.state.value, "StringLiteral"); + + case tt._null: node = this.startNode(); - node.rawValue = node.value = this.match(tt._null) ? null : this.match(tt._true); + this.next(); + return this.finishNode(node, "NullLiteral"); + + case tt._true: case tt._false: + node = this.startNode(); + node.rawValue = node.value = this.match(tt._true); node.raw = this.state.type.keyword; this.next(); - return this.finishNode(node, "Literal"); + return this.finishNode(node, "BooleanLiteral"); case tt.parenL: return this.parseParenAndDistinguishExpression(null, null, canBeArrow); @@ -443,12 +460,12 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { } }; -pp.parseLiteral = function (value) { +pp.parseLiteral = function (value, type) { let node = this.startNode(); node.rawValue = node.value = value; node.raw = this.input.slice(this.state.start, this.state.end); this.next(); - return this.finishNode(node, "Literal"); + return this.finishNode(node, type); }; pp.parseParenExpression = function () { diff --git a/src/parser/statement.js b/src/parser/statement.js index 9f5457f9c4..1d8ea87793 100644 --- a/src/parser/statement.js +++ b/src/parser/statement.js @@ -565,7 +565,7 @@ pp.parseClass = function (node, isStatement, optionalId) { key = this.parsePropertyName(method); } if (!method.static && (key.type === "Identifier" && key.name === "constructor" || - key.type === "Literal" && key.value === "constructor")) { + key.type === "StringLiteral" && key.value === "constructor")) { if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class"); if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier"); if (isGenerator) this.raise(key.start, "Constructor can't be a generator"); diff --git a/src/parser/util.js b/src/parser/util.js index 784daad310..29cdc074c6 100644 --- a/src/parser/util.js +++ b/src/parser/util.js @@ -9,7 +9,7 @@ const pp = Parser.prototype; // Test whether a statement node is the string literal `"use strict"`. pp.isUseStrict = function (stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.raw.slice(1, -1) === "use strict"; + return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && stmt.expression.raw.slice(1, -1) === "use strict"; }; // TODO diff --git a/src/plugins/jsx/index.js b/src/plugins/jsx/index.js index f573fff9e9..b6ae663bee 100644 --- a/src/plugins/jsx/index.js +++ b/src/plugins/jsx/index.js @@ -382,7 +382,7 @@ export default function(instance) { instance.extend("parseExprAtom", function(inner) { return function(refShortHandDefaultPos) { if (this.match(tt.jsxText)) { - var node = this.parseLiteral(this.state.value); + var node = this.parseLiteral(this.state.value, "JSXText"); // https://github.com/babel/babel/issues/2078 node.rawValue = null; return node; diff --git a/test/fixtures/comments/basic/surrounding-throw-comments/expected.json b/test/fixtures/comments/basic/surrounding-throw-comments/expected.json index 1d43e1eea5..41527785fb 100755 --- a/test/fixtures/comments/basic/surrounding-throw-comments/expected.json +++ b/test/fixtures/comments/basic/surrounding-throw-comments/expected.json @@ -91,7 +91,7 @@ } }, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 42, "end": 44, "loc": { diff --git a/test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json b/test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json index c749fccc76..9d9f17495b 100755 --- a/test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json +++ b/test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json @@ -91,7 +91,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 37, "end": 41, "loc": { diff --git a/test/fixtures/comments/basic/switch-fallthrough-comment-in-function/expected.json b/test/fixtures/comments/basic/switch-fallthrough-comment-in-function/expected.json index c53e024530..1258711857 100755 --- a/test/fixtures/comments/basic/switch-fallthrough-comment-in-function/expected.json +++ b/test/fixtures/comments/basic/switch-fallthrough-comment-in-function/expected.json @@ -140,7 +140,7 @@ }, "consequent": [], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 66, "end": 67, "loc": { @@ -267,7 +267,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 111, "end": 112, "loc": { diff --git a/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json b/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json index 7bd86859b4..73e33512ba 100755 --- a/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json +++ b/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json @@ -75,7 +75,7 @@ }, "consequent": [], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 34, "end": 35, "loc": { @@ -202,7 +202,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 71, "end": 72, "loc": { diff --git a/test/fixtures/comments/basic/switch-no-default-comment-in-function/expected.json b/test/fixtures/comments/basic/switch-no-default-comment-in-function/expected.json index e01a3fd11c..24a358f0e2 100755 --- a/test/fixtures/comments/basic/switch-no-default-comment-in-function/expected.json +++ b/test/fixtures/comments/basic/switch-no-default-comment-in-function/expected.json @@ -157,7 +157,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 48, "end": 49, "loc": { @@ -210,7 +210,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 83, "end": 84, "loc": { diff --git a/test/fixtures/comments/basic/switch-no-default-comment-in-nested-functions/expected.json b/test/fixtures/comments/basic/switch-no-default-comment-in-nested-functions/expected.json index 2dbbec6d67..c3f7926916 100755 --- a/test/fixtures/comments/basic/switch-no-default-comment-in-nested-functions/expected.json +++ b/test/fixtures/comments/basic/switch-no-default-comment-in-nested-functions/expected.json @@ -501,7 +501,7 @@ }, "operator": "-", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 215, "end": 216, "loc": { @@ -527,7 +527,7 @@ } ], "test": { - "type": "Literal", + "type": "StringLiteral", "start": 116, "end": 136, "loc": { @@ -584,7 +584,7 @@ } }, "argument": { - "type": "Literal", + "type": "BooleanLiteral", "start": 271, "end": 276, "loc": { diff --git a/test/fixtures/comments/basic/switch-no-default-comment/expected.json b/test/fixtures/comments/basic/switch-no-default-comment/expected.json index a895f6dde3..79727f2aa4 100755 --- a/test/fixtures/comments/basic/switch-no-default-comment/expected.json +++ b/test/fixtures/comments/basic/switch-no-default-comment/expected.json @@ -94,7 +94,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 22, "end": 23, "loc": { diff --git a/test/fixtures/core/categorized/regex-after-block/expected.json b/test/fixtures/core/categorized/regex-after-block/expected.json index 9865ab3100..9abc79800a 100644 --- a/test/fixtures/core/categorized/regex-after-block/expected.json +++ b/test/fixtures/core/categorized/regex-after-block/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 4, "end": 8, "loc": { @@ -93,7 +93,7 @@ } }, "expression": { - "type": "Literal", + "type": "RegexLiteral", "start": 15, "end": 20, "loc": { @@ -107,10 +107,8 @@ } }, "raw": "/foo/", - "regex": { - "pattern": "foo", - "flags": "" - } + "pattern": "foo", + "flags": "" } } ] diff --git a/test/fixtures/core/uncategorised/10/expected.json b/test/fixtures/core/uncategorised/10/expected.json index 61f7bde252..da404948f1 100644 --- a/test/fixtures/core/uncategorised/10/expected.json +++ b/test/fixtures/core/uncategorised/10/expected.json @@ -89,7 +89,7 @@ }, "elements": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 8, "loc": { diff --git a/test/fixtures/core/uncategorised/100/expected.json b/test/fixtures/core/uncategorised/100/expected.json index aaafd737c7..4b7d0df83e 100644 --- a/test/fixtures/core/uncategorised/100/expected.json +++ b/test/fixtures/core/uncategorised/100/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/101/expected.json b/test/fixtures/core/uncategorised/101/expected.json index bea6bba9b2..5255b7b53d 100644 --- a/test/fixtures/core/uncategorised/101/expected.json +++ b/test/fixtures/core/uncategorised/101/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/102/expected.json b/test/fixtures/core/uncategorised/102/expected.json index 009a9e4ed5..6146d006c2 100644 --- a/test/fixtures/core/uncategorised/102/expected.json +++ b/test/fixtures/core/uncategorised/102/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "RegexLiteral", "start": 8, "end": 16, "loc": { @@ -88,10 +88,8 @@ } }, "raw": "/[a-z]/i", - "regex": { - "pattern": "[a-z]", - "flags": "i" - } + "pattern": "[a-z]", + "flags": "i" } } ], @@ -99,4 +97,4 @@ } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/103/expected.json b/test/fixtures/core/uncategorised/103/expected.json index ed4fe7cded..e5403147fe 100644 --- a/test/fixtures/core/uncategorised/103/expected.json +++ b/test/fixtures/core/uncategorised/103/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "RegexLiteral", "start": 8, "end": 16, "loc": { @@ -88,10 +88,8 @@ } }, "raw": "/[x-z]/i", - "regex": { - "pattern": "[x-z]", - "flags": "i" - } + "pattern": "[x-z]", + "flags": "i" } } ], @@ -99,4 +97,4 @@ } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/104/expected.json b/test/fixtures/core/uncategorised/104/expected.json index b9f26b24b0..f998864e01 100644 --- a/test/fixtures/core/uncategorised/104/expected.json +++ b/test/fixtures/core/uncategorised/104/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "RegexLiteral", "start": 8, "end": 16, "loc": { @@ -88,10 +88,8 @@ } }, "raw": "/[a-c]/i", - "regex": { - "pattern": "[a-c]", - "flags": "i" - } + "pattern": "[a-c]", + "flags": "i" } } ], @@ -99,4 +97,4 @@ } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/105/expected.json b/test/fixtures/core/uncategorised/105/expected.json index 9a938ecee4..4119341722 100644 --- a/test/fixtures/core/uncategorised/105/expected.json +++ b/test/fixtures/core/uncategorised/105/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "RegexLiteral", "start": 8, "end": 17, "loc": { @@ -88,10 +88,8 @@ } }, "raw": "/[P QR]/i", - "regex": { - "pattern": "[P QR]", - "flags": "i" - } + "pattern": "[P QR]", + "flags": "i" } } ], @@ -99,4 +97,4 @@ } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/106/expected.json b/test/fixtures/core/uncategorised/106/expected.json index 25323deabf..323385e36b 100644 --- a/test/fixtures/core/uncategorised/106/expected.json +++ b/test/fixtures/core/uncategorised/106/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "RegexLiteral", "start": 8, "end": 18, "loc": { @@ -88,10 +88,8 @@ } }, "raw": "/foo\\/bar/", - "regex": { - "pattern": "foo\\/bar", - "flags": "" - } + "pattern": "foo\\/bar", + "flags": "" } } ], @@ -99,4 +97,4 @@ } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/107/expected.json b/test/fixtures/core/uncategorised/107/expected.json index 85f4f1e155..b973814034 100644 --- a/test/fixtures/core/uncategorised/107/expected.json +++ b/test/fixtures/core/uncategorised/107/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "RegexLiteral", "start": 8, "end": 21, "loc": { @@ -88,10 +88,8 @@ } }, "raw": "/=([^=\\s])+/g", - "regex": { - "pattern": "=([^=\\s])+", - "flags": "g" - } + "pattern": "=([^=\\s])+", + "flags": "g" } } ], @@ -99,4 +97,4 @@ } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/108/expected.json b/test/fixtures/core/uncategorised/108/expected.json index d37baa6dd8..533ad1b064 100644 --- a/test/fixtures/core/uncategorised/108/expected.json +++ b/test/fixtures/core/uncategorised/108/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "RegexLiteral", "start": 8, "end": 22, "loc": { @@ -88,10 +88,8 @@ } }, "raw": "/[P QR]/\\u0067", - "regex": { - "pattern": "[P QR]", - "flags": "g" - } + "pattern": "[P QR]", + "flags": "g" } } ], @@ -99,4 +97,4 @@ } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/11/expected.json b/test/fixtures/core/uncategorised/11/expected.json index 3eecd02bc8..e011780af1 100644 --- a/test/fixtures/core/uncategorised/11/expected.json +++ b/test/fixtures/core/uncategorised/11/expected.json @@ -91,7 +91,7 @@ null, null, { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 11, "loc": { diff --git a/test/fixtures/core/uncategorised/12/expected.json b/test/fixtures/core/uncategorised/12/expected.json index e41172db76..90a2413a90 100644 --- a/test/fixtures/core/uncategorised/12/expected.json +++ b/test/fixtures/core/uncategorised/12/expected.json @@ -89,7 +89,7 @@ }, "elements": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { @@ -107,7 +107,7 @@ "raw": "1" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { @@ -125,7 +125,7 @@ "raw": "2" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/core/uncategorised/124/expected.json b/test/fixtures/core/uncategorised/124/expected.json index cca9b0fc82..f26ab8b935 100644 --- a/test/fixtures/core/uncategorised/124/expected.json +++ b/test/fixtures/core/uncategorised/124/expected.json @@ -87,7 +87,7 @@ "name": "universe" }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 11, "loc": { diff --git a/test/fixtures/core/uncategorised/125/expected.json b/test/fixtures/core/uncategorised/125/expected.json index 463a77c2e5..624c7b81b9 100644 --- a/test/fixtures/core/uncategorised/125/expected.json +++ b/test/fixtures/core/uncategorised/125/expected.json @@ -88,7 +88,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 11, "loc": { diff --git a/test/fixtures/core/uncategorised/126/expected.json b/test/fixtures/core/uncategorised/126/expected.json index fab1521321..23d090fedc 100644 --- a/test/fixtures/core/uncategorised/126/expected.json +++ b/test/fixtures/core/uncategorised/126/expected.json @@ -116,7 +116,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 11, "loc": { @@ -155,7 +155,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 22, "end": 24, "loc": { @@ -173,7 +173,7 @@ "raw": "14" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 26, "end": 27, "loc": { @@ -191,7 +191,7 @@ "raw": "3" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 29, "end": 31, "loc": { diff --git a/test/fixtures/core/uncategorised/127/expected.json b/test/fixtures/core/uncategorised/127/expected.json index 762a4f980c..080068549b 100644 --- a/test/fixtures/core/uncategorised/127/expected.json +++ b/test/fixtures/core/uncategorised/127/expected.json @@ -170,7 +170,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 40, "end": 44, "loc": { diff --git a/test/fixtures/core/uncategorised/13/expected.json b/test/fixtures/core/uncategorised/13/expected.json index df8bef639b..9bc040d735 100644 --- a/test/fixtures/core/uncategorised/13/expected.json +++ b/test/fixtures/core/uncategorised/13/expected.json @@ -89,7 +89,7 @@ }, "elements": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { @@ -107,7 +107,7 @@ "raw": "1" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { @@ -126,7 +126,7 @@ }, null, { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/197/expected.json b/test/fixtures/core/uncategorised/197/expected.json index 355a73a1ad..9252297ac7 100644 --- a/test/fixtures/core/uncategorised/197/expected.json +++ b/test/fixtures/core/uncategorised/197/expected.json @@ -73,7 +73,7 @@ "name": "y" }, "consequent": { - "type": "Literal", + "type": "NumberLiteral", "start": 4, "end": 5, "loc": { @@ -91,7 +91,7 @@ "raw": "1" }, "alternate": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { diff --git a/test/fixtures/core/uncategorised/198/expected.json b/test/fixtures/core/uncategorised/198/expected.json index 618615ef5f..6d0cf5e9ff 100644 --- a/test/fixtures/core/uncategorised/198/expected.json +++ b/test/fixtures/core/uncategorised/198/expected.json @@ -105,7 +105,7 @@ } }, "consequent": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { @@ -123,7 +123,7 @@ "raw": "1" }, "alternate": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/199/expected.json b/test/fixtures/core/uncategorised/199/expected.json index dcfe85d992..886a4c91ba 100644 --- a/test/fixtures/core/uncategorised/199/expected.json +++ b/test/fixtures/core/uncategorised/199/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 4, "end": 6, "loc": { diff --git a/test/fixtures/core/uncategorised/2/expected.json b/test/fixtures/core/uncategorised/2/expected.json index 62806e9393..9ca3c11021 100644 --- a/test/fixtures/core/uncategorised/2/expected.json +++ b/test/fixtures/core/uncategorised/2/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NullLiteral", "start": 0, "end": 4, "loc": { @@ -55,10 +55,7 @@ "line": 1, "column": 4 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } } } ] diff --git a/test/fixtures/core/uncategorised/200/expected.json b/test/fixtures/core/uncategorised/200/expected.json index 32e9683fad..087953e749 100644 --- a/test/fixtures/core/uncategorised/200/expected.json +++ b/test/fixtures/core/uncategorised/200/expected.json @@ -74,7 +74,7 @@ "name": "eval" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { diff --git a/test/fixtures/core/uncategorised/201/expected.json b/test/fixtures/core/uncategorised/201/expected.json index aadc603158..c40cefe77a 100644 --- a/test/fixtures/core/uncategorised/201/expected.json +++ b/test/fixtures/core/uncategorised/201/expected.json @@ -74,7 +74,7 @@ "name": "arguments" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/202/expected.json b/test/fixtures/core/uncategorised/202/expected.json index c68b13b4a8..77c0b3f6fd 100644 --- a/test/fixtures/core/uncategorised/202/expected.json +++ b/test/fixtures/core/uncategorised/202/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/core/uncategorised/203/expected.json b/test/fixtures/core/uncategorised/203/expected.json index 2a2e320c76..3ea5616140 100644 --- a/test/fixtures/core/uncategorised/203/expected.json +++ b/test/fixtures/core/uncategorised/203/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/core/uncategorised/204/expected.json b/test/fixtures/core/uncategorised/204/expected.json index f61cd91960..3bb965131c 100644 --- a/test/fixtures/core/uncategorised/204/expected.json +++ b/test/fixtures/core/uncategorised/204/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/core/uncategorised/205/expected.json b/test/fixtures/core/uncategorised/205/expected.json index d87bd7221e..623bec2d65 100644 --- a/test/fixtures/core/uncategorised/205/expected.json +++ b/test/fixtures/core/uncategorised/205/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/core/uncategorised/206/expected.json b/test/fixtures/core/uncategorised/206/expected.json index 58ac4f76d5..169b55b357 100644 --- a/test/fixtures/core/uncategorised/206/expected.json +++ b/test/fixtures/core/uncategorised/206/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/core/uncategorised/207/expected.json b/test/fixtures/core/uncategorised/207/expected.json index 6aec1fd6ae..395bbc5959 100644 --- a/test/fixtures/core/uncategorised/207/expected.json +++ b/test/fixtures/core/uncategorised/207/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 8, "loc": { diff --git a/test/fixtures/core/uncategorised/208/expected.json b/test/fixtures/core/uncategorised/208/expected.json index 2afa7f1ab0..f2baaf2d7c 100644 --- a/test/fixtures/core/uncategorised/208/expected.json +++ b/test/fixtures/core/uncategorised/208/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 8, "loc": { diff --git a/test/fixtures/core/uncategorised/209/expected.json b/test/fixtures/core/uncategorised/209/expected.json index 34ae7fde25..63767ff44b 100644 --- a/test/fixtures/core/uncategorised/209/expected.json +++ b/test/fixtures/core/uncategorised/209/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { diff --git a/test/fixtures/core/uncategorised/210/expected.json b/test/fixtures/core/uncategorised/210/expected.json index a97d4cb79e..22bf53cf58 100644 --- a/test/fixtures/core/uncategorised/210/expected.json +++ b/test/fixtures/core/uncategorised/210/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/core/uncategorised/211/expected.json b/test/fixtures/core/uncategorised/211/expected.json index 7a092cae1b..52cfe31685 100644 --- a/test/fixtures/core/uncategorised/211/expected.json +++ b/test/fixtures/core/uncategorised/211/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/core/uncategorised/212/expected.json b/test/fixtures/core/uncategorised/212/expected.json index 0c297787a4..0cb0e23497 100644 --- a/test/fixtures/core/uncategorised/212/expected.json +++ b/test/fixtures/core/uncategorised/212/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/core/uncategorised/218/expected.json b/test/fixtures/core/uncategorised/218/expected.json index a5b0f49382..746c634e18 100644 --- a/test/fixtures/core/uncategorised/218/expected.json +++ b/test/fixtures/core/uncategorised/218/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { diff --git a/test/fixtures/core/uncategorised/219/expected.json b/test/fixtures/core/uncategorised/219/expected.json index 6ed6cc90fa..e88bd0e0af 100644 --- a/test/fixtures/core/uncategorised/219/expected.json +++ b/test/fixtures/core/uncategorised/219/expected.json @@ -74,7 +74,7 @@ "name": "eval" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { @@ -123,7 +123,7 @@ "name": "arguments" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 27, "end": 29, "loc": { diff --git a/test/fixtures/core/uncategorised/22/expected.json b/test/fixtures/core/uncategorised/22/expected.json index e737e4bf96..6798856802 100644 --- a/test/fixtures/core/uncategorised/22/expected.json +++ b/test/fixtures/core/uncategorised/22/expected.json @@ -122,7 +122,7 @@ "name": "answer" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/220/expected.json b/test/fixtures/core/uncategorised/220/expected.json index 6b9e9e3f3a..f0f1cc157c 100644 --- a/test/fixtures/core/uncategorised/220/expected.json +++ b/test/fixtures/core/uncategorised/220/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { @@ -123,7 +123,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 17, "loc": { @@ -172,7 +172,7 @@ "name": "z" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 27, "loc": { diff --git a/test/fixtures/core/uncategorised/23/expected.json b/test/fixtures/core/uncategorised/23/expected.json index b7e5bc565e..7d1d29919f 100644 --- a/test/fixtures/core/uncategorised/23/expected.json +++ b/test/fixtures/core/uncategorised/23/expected.json @@ -122,7 +122,7 @@ "name": "if" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { diff --git a/test/fixtures/core/uncategorised/230/expected.json b/test/fixtures/core/uncategorised/230/expected.json index c1930814e6..086e802703 100644 --- a/test/fixtures/core/uncategorised/230/expected.json +++ b/test/fixtures/core/uncategorised/230/expected.json @@ -104,7 +104,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 21, "end": 22, "loc": { diff --git a/test/fixtures/core/uncategorised/232/expected.json b/test/fixtures/core/uncategorised/232/expected.json index a065c54055..298c6ed2b8 100644 --- a/test/fixtures/core/uncategorised/232/expected.json +++ b/test/fixtures/core/uncategorised/232/expected.json @@ -90,7 +90,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 18, "end": 22, "loc": { diff --git a/test/fixtures/core/uncategorised/233/expected.json b/test/fixtures/core/uncategorised/233/expected.json index bcc441a257..cf9db0e4fd 100644 --- a/test/fixtures/core/uncategorised/233/expected.json +++ b/test/fixtures/core/uncategorised/233/expected.json @@ -90,7 +90,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 18, "end": 22, "loc": { diff --git a/test/fixtures/core/uncategorised/234/expected.json b/test/fixtures/core/uncategorised/234/expected.json index 09c2e86050..3bd687b08d 100644 --- a/test/fixtures/core/uncategorised/234/expected.json +++ b/test/fixtures/core/uncategorised/234/expected.json @@ -187,7 +187,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 28, "end": 30, "loc": { diff --git a/test/fixtures/core/uncategorised/235/expected.json b/test/fixtures/core/uncategorised/235/expected.json index 2333bd0d07..5f92a264ce 100644 --- a/test/fixtures/core/uncategorised/235/expected.json +++ b/test/fixtures/core/uncategorised/235/expected.json @@ -74,7 +74,7 @@ "body": [] }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 16, "end": 21, "loc": { @@ -107,7 +107,7 @@ } }, "expression": { - "type": "Literal", + "type": "BooleanLiteral", "start": 23, "end": 28, "loc": { diff --git a/test/fixtures/core/uncategorised/236/expected.json b/test/fixtures/core/uncategorised/236/expected.json index e3ddda1e17..b68c4e6106 100644 --- a/test/fixtures/core/uncategorised/236/expected.json +++ b/test/fixtures/core/uncategorised/236/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/core/uncategorised/237/expected.json b/test/fixtures/core/uncategorised/237/expected.json index bf0cf79afd..c7381370ab 100644 --- a/test/fixtures/core/uncategorised/237/expected.json +++ b/test/fixtures/core/uncategorised/237/expected.json @@ -74,7 +74,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { diff --git a/test/fixtures/core/uncategorised/24/expected.json b/test/fixtures/core/uncategorised/24/expected.json index 91bb601500..80a4774e20 100644 --- a/test/fixtures/core/uncategorised/24/expected.json +++ b/test/fixtures/core/uncategorised/24/expected.json @@ -122,7 +122,7 @@ "name": "true" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/240/expected.json b/test/fixtures/core/uncategorised/240/expected.json index 0221127370..f45ca7088d 100644 --- a/test/fixtures/core/uncategorised/240/expected.json +++ b/test/fixtures/core/uncategorised/240/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { diff --git a/test/fixtures/core/uncategorised/241/expected.json b/test/fixtures/core/uncategorised/241/expected.json index 46c4e44c8f..6640f73295 100644 --- a/test/fixtures/core/uncategorised/241/expected.json +++ b/test/fixtures/core/uncategorised/241/expected.json @@ -88,7 +88,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/core/uncategorised/242/expected.json b/test/fixtures/core/uncategorised/242/expected.json index 20b89977b6..61391fdd9f 100644 --- a/test/fixtures/core/uncategorised/242/expected.json +++ b/test/fixtures/core/uncategorised/242/expected.json @@ -88,7 +88,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { @@ -137,7 +137,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 19, "end": 20, "loc": { diff --git a/test/fixtures/core/uncategorised/243/expected.json b/test/fixtures/core/uncategorised/243/expected.json index 66dff360f5..fb76721dce 100644 --- a/test/fixtures/core/uncategorised/243/expected.json +++ b/test/fixtures/core/uncategorised/243/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { @@ -124,7 +124,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/core/uncategorised/244/expected.json b/test/fixtures/core/uncategorised/244/expected.json index 1943c72a2e..f826f885de 100644 --- a/test/fixtures/core/uncategorised/244/expected.json +++ b/test/fixtures/core/uncategorised/244/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { @@ -124,7 +124,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/core/uncategorised/245/expected.json b/test/fixtures/core/uncategorised/245/expected.json index ea41666efe..16f684a226 100644 --- a/test/fixtures/core/uncategorised/245/expected.json +++ b/test/fixtures/core/uncategorised/245/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { @@ -124,7 +124,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/core/uncategorised/25/expected.json b/test/fixtures/core/uncategorised/25/expected.json index bf78e60abe..a6a31f5362 100644 --- a/test/fixtures/core/uncategorised/25/expected.json +++ b/test/fixtures/core/uncategorised/25/expected.json @@ -122,7 +122,7 @@ "name": "false" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 15, "loc": { diff --git a/test/fixtures/core/uncategorised/250/expected.json b/test/fixtures/core/uncategorised/250/expected.json index 9ea0854331..40763456b0 100644 --- a/test/fixtures/core/uncategorised/250/expected.json +++ b/test/fixtures/core/uncategorised/250/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/core/uncategorised/251/expected.json b/test/fixtures/core/uncategorised/251/expected.json index 3cadc13b16..bfea074cf1 100644 --- a/test/fixtures/core/uncategorised/251/expected.json +++ b/test/fixtures/core/uncategorised/251/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/core/uncategorised/252/expected.json b/test/fixtures/core/uncategorised/252/expected.json index 661b7b9d0a..f43031468c 100644 --- a/test/fixtures/core/uncategorised/252/expected.json +++ b/test/fixtures/core/uncategorised/252/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 13, "end": 17, "loc": { diff --git a/test/fixtures/core/uncategorised/253/expected.json b/test/fixtures/core/uncategorised/253/expected.json index 3c06ab2a96..3b684f46cb 100644 --- a/test/fixtures/core/uncategorised/253/expected.json +++ b/test/fixtures/core/uncategorised/253/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 13, "end": 17, "loc": { diff --git a/test/fixtures/core/uncategorised/254/expected.json b/test/fixtures/core/uncategorised/254/expected.json index 1d9fe4c071..15042df691 100644 --- a/test/fixtures/core/uncategorised/254/expected.json +++ b/test/fixtures/core/uncategorised/254/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/core/uncategorised/255/expected.json b/test/fixtures/core/uncategorised/255/expected.json index de1ad554fa..be48009734 100644 --- a/test/fixtures/core/uncategorised/255/expected.json +++ b/test/fixtures/core/uncategorised/255/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 13, "end": 17, "loc": { diff --git a/test/fixtures/core/uncategorised/256/expected.json b/test/fixtures/core/uncategorised/256/expected.json index 62a3160e6e..6c31c586d6 100644 --- a/test/fixtures/core/uncategorised/256/expected.json +++ b/test/fixtures/core/uncategorised/256/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 13, "end": 17, "loc": { diff --git a/test/fixtures/core/uncategorised/26/expected.json b/test/fixtures/core/uncategorised/26/expected.json index 4a45b6dd41..e516e972e9 100644 --- a/test/fixtures/core/uncategorised/26/expected.json +++ b/test/fixtures/core/uncategorised/26/expected.json @@ -122,7 +122,7 @@ "name": "null" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/269/expected.json b/test/fixtures/core/uncategorised/269/expected.json index 62e79f338e..9758d61707 100644 --- a/test/fixtures/core/uncategorised/269/expected.json +++ b/test/fixtures/core/uncategorised/269/expected.json @@ -139,7 +139,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { diff --git a/test/fixtures/core/uncategorised/27/expected.json b/test/fixtures/core/uncategorised/27/expected.json index 8f6fb8980a..96a8fd0d09 100644 --- a/test/fixtures/core/uncategorised/27/expected.json +++ b/test/fixtures/core/uncategorised/27/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 6, "end": 14, "loc": { @@ -124,7 +124,7 @@ "raw": "\"answer\"" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 18, "loc": { diff --git a/test/fixtures/core/uncategorised/270/expected.json b/test/fixtures/core/uncategorised/270/expected.json index b29ad0f66d..7400509d5f 100644 --- a/test/fixtures/core/uncategorised/270/expected.json +++ b/test/fixtures/core/uncategorised/270/expected.json @@ -139,7 +139,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { diff --git a/test/fixtures/core/uncategorised/272/expected.json b/test/fixtures/core/uncategorised/272/expected.json index cddf16fc26..c4f9e0e386 100644 --- a/test/fixtures/core/uncategorised/272/expected.json +++ b/test/fixtures/core/uncategorised/272/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 14, "end": 18, "loc": { diff --git a/test/fixtures/core/uncategorised/275/expected.json b/test/fixtures/core/uncategorised/275/expected.json index fe437eefa7..dc9afaed76 100644 --- a/test/fixtures/core/uncategorised/275/expected.json +++ b/test/fixtures/core/uncategorised/275/expected.json @@ -91,7 +91,7 @@ "name": "message" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 24, "loc": { diff --git a/test/fixtures/core/uncategorised/28/expected.json b/test/fixtures/core/uncategorised/28/expected.json index 4a5cc05f3d..d754d81e2b 100644 --- a/test/fixtures/core/uncategorised/28/expected.json +++ b/test/fixtures/core/uncategorised/28/expected.json @@ -122,7 +122,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { @@ -175,7 +175,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/289/expected.json b/test/fixtures/core/uncategorised/289/expected.json index c1db4cf35a..f5013969f2 100644 --- a/test/fixtures/core/uncategorised/289/expected.json +++ b/test/fixtures/core/uncategorised/289/expected.json @@ -139,7 +139,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 37, "end": 49, "loc": { diff --git a/test/fixtures/core/uncategorised/3/expected.json b/test/fixtures/core/uncategorised/3/expected.json index c05561829f..778ef2fe98 100644 --- a/test/fixtures/core/uncategorised/3/expected.json +++ b/test/fixtures/core/uncategorised/3/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/core/uncategorised/303/expected.json b/test/fixtures/core/uncategorised/303/expected.json index 54b06ec57a..b3c4b6a133 100644 --- a/test/fixtures/core/uncategorised/303/expected.json +++ b/test/fixtures/core/uncategorised/303/expected.json @@ -89,7 +89,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { @@ -138,7 +138,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { diff --git a/test/fixtures/core/uncategorised/304/expected.json b/test/fixtures/core/uncategorised/304/expected.json index 417879a077..253be28d97 100644 --- a/test/fixtures/core/uncategorised/304/expected.json +++ b/test/fixtures/core/uncategorised/304/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/core/uncategorised/305/expected.json b/test/fixtures/core/uncategorised/305/expected.json index 85d1c9cc9b..567f02ad8f 100644 --- a/test/fixtures/core/uncategorised/305/expected.json +++ b/test/fixtures/core/uncategorised/305/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { @@ -172,5 +172,27 @@ } } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " Comment", + "start": 24, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "range": [ + 24, + 34 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/306/expected.json b/test/fixtures/core/uncategorised/306/expected.json index 420314dcf8..b094efe11f 100644 --- a/test/fixtures/core/uncategorised/306/expected.json +++ b/test/fixtures/core/uncategorised/306/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { @@ -172,5 +172,27 @@ } } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": " Multiline\nComment ", + "start": 24, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "range": [ + 24, + 47 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/307/expected.json b/test/fixtures/core/uncategorised/307/expected.json index 6f55ed4658..be91d94441 100644 --- a/test/fixtures/core/uncategorised/307/expected.json +++ b/test/fixtures/core/uncategorised/307/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/core/uncategorised/308/expected.json b/test/fixtures/core/uncategorised/308/expected.json index 16b5f8de23..2fc3f311ee 100644 --- a/test/fixtures/core/uncategorised/308/expected.json +++ b/test/fixtures/core/uncategorised/308/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { @@ -172,5 +172,27 @@ } } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " Comment", + "start": 21, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "range": [ + 21, + 31 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/309/expected.json b/test/fixtures/core/uncategorised/309/expected.json index f41d20534e..6720b43723 100644 --- a/test/fixtures/core/uncategorised/309/expected.json +++ b/test/fixtures/core/uncategorised/309/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { @@ -172,5 +172,27 @@ } } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": " Multiline\nComment ", + "start": 21, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "range": [ + 21, + 44 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/317/expected.json b/test/fixtures/core/uncategorised/317/expected.json index 70a7b043b5..77f0623dd0 100644 --- a/test/fixtures/core/uncategorised/317/expected.json +++ b/test/fixtures/core/uncategorised/317/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 9, "end": 13, "loc": { diff --git a/test/fixtures/core/uncategorised/318/expected.json b/test/fixtures/core/uncategorised/318/expected.json index 1af7d36137..a9f877830b 100644 --- a/test/fixtures/core/uncategorised/318/expected.json +++ b/test/fixtures/core/uncategorised/318/expected.json @@ -104,7 +104,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 16, "end": 28, "loc": { @@ -137,7 +137,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 31, "end": 34, "loc": { diff --git a/test/fixtures/core/uncategorised/319/expected.json b/test/fixtures/core/uncategorised/319/expected.json index 7bfda37783..c8465306e7 100644 --- a/test/fixtures/core/uncategorised/319/expected.json +++ b/test/fixtures/core/uncategorised/319/expected.json @@ -71,7 +71,7 @@ } }, "object": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { @@ -108,7 +108,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/320/expected.json b/test/fixtures/core/uncategorised/320/expected.json index d18528b0b3..dfcf159a6b 100644 --- a/test/fixtures/core/uncategorised/320/expected.json +++ b/test/fixtures/core/uncategorised/320/expected.json @@ -57,7 +57,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { @@ -76,7 +76,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 6, "loc": { diff --git a/test/fixtures/core/uncategorised/322/expected.json b/test/fixtures/core/uncategorised/322/expected.json index 4bb48ca6a4..312ab26090 100644 --- a/test/fixtures/core/uncategorised/322/expected.json +++ b/test/fixtures/core/uncategorised/322/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 10, "loc": { diff --git a/test/fixtures/core/uncategorised/323/expected.json b/test/fixtures/core/uncategorised/323/expected.json index ed6fd4e376..a3669a1658 100644 --- a/test/fixtures/core/uncategorised/323/expected.json +++ b/test/fixtures/core/uncategorised/323/expected.json @@ -57,7 +57,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { @@ -121,7 +121,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/324/expected.json b/test/fixtures/core/uncategorised/324/expected.json index e28711fe0b..5409838244 100644 --- a/test/fixtures/core/uncategorised/324/expected.json +++ b/test/fixtures/core/uncategorised/324/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 3, "end": 4, "loc": { @@ -75,7 +75,7 @@ } }, "expression": { - "type": "Literal", + "type": "RegexLiteral", "start": 5, "end": 12, "loc": { @@ -89,14 +89,12 @@ } }, "raw": "/ foo/", - "regex": { - "pattern": " foo", - "flags": "" - } + "pattern": " foo", + "flags": "" } }, "alternate": null } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/341/expected.json b/test/fixtures/core/uncategorised/341/expected.json index 88d5fefb2d..599c268bdf 100644 --- a/test/fixtures/core/uncategorised/341/expected.json +++ b/test/fixtures/core/uncategorised/341/expected.json @@ -59,7 +59,7 @@ } }, "expression": { - "type": "Literal", + "type": "RegexLiteral", "start": 2, "end": 5, "loc": { @@ -73,12 +73,10 @@ } }, "raw": "/=/", - "regex": { - "pattern": "=", - "flags": "" - } + "pattern": "=", + "flags": "" } } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/343/expected.json b/test/fixtures/core/uncategorised/343/expected.json index 4d99a8faca..16ef7df684 100644 --- a/test/fixtures/core/uncategorised/343/expected.json +++ b/test/fixtures/core/uncategorised/343/expected.json @@ -122,7 +122,7 @@ }, "operator": ">", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { @@ -165,5 +165,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " nothing", + "start": 13, + "end": 24, + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "range": [ + 13, + 24 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/344/expected.json b/test/fixtures/core/uncategorised/344/expected.json index d8e160600f..c8acee55d3 100644 --- a/test/fixtures/core/uncategorised/344/expected.json +++ b/test/fixtures/core/uncategorised/344/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 12, "loc": { diff --git a/test/fixtures/core/uncategorised/35/expected.json b/test/fixtures/core/uncategorised/35/expected.json index d8f2ba1cf2..929aaebf51 100644 --- a/test/fixtures/core/uncategorised/35/expected.json +++ b/test/fixtures/core/uncategorised/35/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 10, "end": 17, "loc": { diff --git a/test/fixtures/core/uncategorised/36/expected.json b/test/fixtures/core/uncategorised/36/expected.json index a9d4864fed..2249562b63 100644 --- a/test/fixtures/core/uncategorised/36/expected.json +++ b/test/fixtures/core/uncategorised/36/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { diff --git a/test/fixtures/core/uncategorised/4/expected.json b/test/fixtures/core/uncategorised/4/expected.json index 9c29ccb629..cfa64792cf 100644 --- a/test/fixtures/core/uncategorised/4/expected.json +++ b/test/fixtures/core/uncategorised/4/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "RegexLiteral", "start": 0, "end": 8, "loc": { @@ -57,12 +57,10 @@ } }, "raw": "/foobar/", - "regex": { - "pattern": "foobar", - "flags": "" - } + "pattern": "foobar", + "flags": "" } } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/42/expected.json b/test/fixtures/core/uncategorised/42/expected.json index fbaae8d9f1..e1c3ca9d7e 100644 --- a/test/fixtures/core/uncategorised/42/expected.json +++ b/test/fixtures/core/uncategorised/42/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 10, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/43/expected.json b/test/fixtures/core/uncategorised/43/expected.json index ae9c51390d..831c152d07 100644 --- a/test/fixtures/core/uncategorised/43/expected.json +++ b/test/fixtures/core/uncategorised/43/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { diff --git a/test/fixtures/core/uncategorised/44/expected.json b/test/fixtures/core/uncategorised/44/expected.json index fa0228a80c..22361a57aa 100644 --- a/test/fixtures/core/uncategorised/44/expected.json +++ b/test/fixtures/core/uncategorised/44/expected.json @@ -122,7 +122,7 @@ "name": "get" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { diff --git a/test/fixtures/core/uncategorised/45/expected.json b/test/fixtures/core/uncategorised/45/expected.json index 360cc1183c..96f2955db3 100644 --- a/test/fixtures/core/uncategorised/45/expected.json +++ b/test/fixtures/core/uncategorised/45/expected.json @@ -122,7 +122,7 @@ "name": "set" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { diff --git a/test/fixtures/core/uncategorised/46/expected.json b/test/fixtures/core/uncategorised/46/expected.json index 70440e8cff..dd2e0291b4 100644 --- a/test/fixtures/core/uncategorised/46/expected.json +++ b/test/fixtures/core/uncategorised/46/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 20, "end": 22, "loc": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": " block comment ", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "range": [ + 0, + 19 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/47/expected.json b/test/fixtures/core/uncategorised/47/expected.json index 972e9a1f34..850a6eaa47 100644 --- a/test/fixtures/core/uncategorised/47/expected.json +++ b/test/fixtures/core/uncategorised/47/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 2, "loc": { @@ -106,5 +106,47 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "The", + "start": 3, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "range": [ + 3, + 10 + ] + }, + { + "type": "CommentBlock", + "value": "Answer", + "start": 11, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "range": [ + 11, + 21 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/48/expected.json b/test/fixtures/core/uncategorised/48/expected.json index 48a16dd3ba..128dc0844c 100644 --- a/test/fixtures/core/uncategorised/48/expected.json +++ b/test/fixtures/core/uncategorised/48/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 2, "loc": { @@ -106,5 +106,47 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "the", + "start": 3, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "range": [ + 3, + 10 + ] + }, + { + "type": "CommentBlock", + "value": "answer", + "start": 11, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "range": [ + 11, + 21 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/49/expected.json b/test/fixtures/core/uncategorised/49/expected.json index 3571b1a22a..f60e121523 100644 --- a/test/fixtures/core/uncategorised/49/expected.json +++ b/test/fixtures/core/uncategorised/49/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 42, "end": 44, "loc": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": " multiline\ncomment\nshould\nbe\nignored ", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 10 + } + }, + "range": [ + 0, + 41 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/5/expected.json b/test/fixtures/core/uncategorised/5/expected.json index 9b766664c8..00b6bbab99 100644 --- a/test/fixtures/core/uncategorised/5/expected.json +++ b/test/fixtures/core/uncategorised/5/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "RegexLiteral", "start": 0, "end": 8, "loc": { @@ -57,12 +57,10 @@ } }, "raw": "/[a-z]/g", - "regex": { - "pattern": "[a-z]", - "flags": "g" - } + "pattern": "[a-z]", + "flags": "g" } } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/50/expected.json b/test/fixtures/core/uncategorised/50/expected.json index b39cabe82a..1941345514 100644 --- a/test/fixtures/core/uncategorised/50/expected.json +++ b/test/fixtures/core/uncategorised/50/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "a\nb", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "range": [ + 0, + 7 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/51/expected.json b/test/fixtures/core/uncategorised/51/expected.json index 5028451839..a6794f44ff 100644 --- a/test/fixtures/core/uncategorised/51/expected.json +++ b/test/fixtures/core/uncategorised/51/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "a\rb", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "range": [ + 0, + 7 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/52/expected.json b/test/fixtures/core/uncategorised/52/expected.json index b39cabe82a..1941345514 100644 --- a/test/fixtures/core/uncategorised/52/expected.json +++ b/test/fixtures/core/uncategorised/52/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "a\nb", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "range": [ + 0, + 7 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/527/expected.json b/test/fixtures/core/uncategorised/527/expected.json index 26048dfd5a..966e0d2d6f 100644 --- a/test/fixtures/core/uncategorised/527/expected.json +++ b/test/fixtures/core/uncategorised/527/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { diff --git a/test/fixtures/core/uncategorised/528/expected.json b/test/fixtures/core/uncategorised/528/expected.json index 769f0e0bf2..fc6d35a712 100644 --- a/test/fixtures/core/uncategorised/528/expected.json +++ b/test/fixtures/core/uncategorised/528/expected.json @@ -74,7 +74,7 @@ "name": "eval" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { @@ -123,7 +123,7 @@ "name": "arguments" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 27, "end": 29, "loc": { diff --git a/test/fixtures/core/uncategorised/529/expected.json b/test/fixtures/core/uncategorised/529/expected.json index 72a0f70422..bd5767e5df 100644 --- a/test/fixtures/core/uncategorised/529/expected.json +++ b/test/fixtures/core/uncategorised/529/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { @@ -123,7 +123,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 17, "loc": { @@ -172,7 +172,7 @@ "name": "z" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 27, "loc": { diff --git a/test/fixtures/core/uncategorised/53/expected.json b/test/fixtures/core/uncategorised/53/expected.json index 87e3d95851..3b798c3d36 100644 --- a/test/fixtures/core/uncategorised/53/expected.json +++ b/test/fixtures/core/uncategorised/53/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "a\nc", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "range": [ + 0, + 7 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/530/expected.json b/test/fixtures/core/uncategorised/530/expected.json index 5f7188a434..e10d00d731 100644 --- a/test/fixtures/core/uncategorised/530/expected.json +++ b/test/fixtures/core/uncategorised/530/expected.json @@ -88,7 +88,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/core/uncategorised/531/expected.json b/test/fixtures/core/uncategorised/531/expected.json index e7d044a4ed..3d38c67b22 100644 --- a/test/fixtures/core/uncategorised/531/expected.json +++ b/test/fixtures/core/uncategorised/531/expected.json @@ -88,7 +88,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { @@ -137,7 +137,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 19, "end": 20, "loc": { diff --git a/test/fixtures/core/uncategorised/533/expected.json b/test/fixtures/core/uncategorised/533/expected.json index 7a3105b73c..dcf8a26650 100644 --- a/test/fixtures/core/uncategorised/533/expected.json +++ b/test/fixtures/core/uncategorised/533/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { diff --git a/test/fixtures/core/uncategorised/534/expected.json b/test/fixtures/core/uncategorised/534/expected.json index 6fe8322ba5..3a6addea10 100644 --- a/test/fixtures/core/uncategorised/534/expected.json +++ b/test/fixtures/core/uncategorised/534/expected.json @@ -74,7 +74,7 @@ "name": "eval" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 15, "loc": { @@ -123,7 +123,7 @@ "name": "arguments" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 29, "end": 31, "loc": { diff --git a/test/fixtures/core/uncategorised/535/expected.json b/test/fixtures/core/uncategorised/535/expected.json index 8a1741ec4b..15ba33cd4d 100644 --- a/test/fixtures/core/uncategorised/535/expected.json +++ b/test/fixtures/core/uncategorised/535/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { @@ -123,7 +123,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { @@ -172,7 +172,7 @@ "name": "z" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 25, "end": 29, "loc": { diff --git a/test/fixtures/core/uncategorised/537/expected.json b/test/fixtures/core/uncategorised/537/expected.json index 7a71d52992..50fd4d6345 100644 --- a/test/fixtures/core/uncategorised/537/expected.json +++ b/test/fixtures/core/uncategorised/537/expected.json @@ -88,7 +88,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 15, "loc": { @@ -128,6 +128,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/54/expected.json b/test/fixtures/core/uncategorised/54/expected.json index 848acc5805..526710b150 100644 --- a/test/fixtures/core/uncategorised/54/expected.json +++ b/test/fixtures/core/uncategorised/54/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 18, "loc": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " line comment", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "range": [ + 0, + 15 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/540/expected.json b/test/fixtures/core/uncategorised/540/expected.json index 1363375b12..3b9f0e4448 100644 --- a/test/fixtures/core/uncategorised/540/expected.json +++ b/test/fixtures/core/uncategorised/540/expected.json @@ -93,7 +93,7 @@ }, "operator": "/", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { diff --git a/test/fixtures/core/uncategorised/541/expected.json b/test/fixtures/core/uncategorised/541/expected.json index ece4393a86..93d8cd375b 100644 --- a/test/fixtures/core/uncategorised/541/expected.json +++ b/test/fixtures/core/uncategorised/541/expected.json @@ -93,7 +93,7 @@ } }, "expression": { - "type": "Literal", + "type": "RegexLiteral", "start": 16, "end": 21, "loc": { @@ -107,12 +107,10 @@ } }, "raw": "/ 1 /", - "regex": { - "pattern": " 1 ", - "flags": "" - } + "pattern": " 1 ", + "flags": "" } } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/55/expected.json b/test/fixtures/core/uncategorised/55/expected.json index 5694227afb..b400dbe706 100644 --- a/test/fixtures/core/uncategorised/55/expected.json +++ b/test/fixtures/core/uncategorised/55/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 2, "loc": { @@ -86,5 +86,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " line comment", + "start": 3, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "range": [ + 3, + 18 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/56/expected.json b/test/fixtures/core/uncategorised/56/expected.json index df154b7af9..337ed51862 100644 --- a/test/fixtures/core/uncategorised/56/expected.json +++ b/test/fixtures/core/uncategorised/56/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 17, "end": 19, "loc": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " Hello, world!", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "range": [ + 0, + 16 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/59/expected.json b/test/fixtures/core/uncategorised/59/expected.json index 70cab4ee43..4ab335adab 100644 --- a/test/fixtures/core/uncategorised/59/expected.json +++ b/test/fixtures/core/uncategorised/59/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 3, "end": 5, "loc": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": "", + "start": 0, + "end": 2, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + }, + "range": [ + 0, + 2 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/6/expected.json b/test/fixtures/core/uncategorised/6/expected.json index 22d4ac246e..deaf7c1729 100644 --- a/test/fixtures/core/uncategorised/6/expected.json +++ b/test/fixtures/core/uncategorised/6/expected.json @@ -71,7 +71,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 1, "end": 2, "loc": { @@ -90,7 +90,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 6, "loc": { @@ -111,7 +111,7 @@ }, "operator": "*", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 12, "loc": { diff --git a/test/fixtures/core/uncategorised/62/expected.json b/test/fixtures/core/uncategorised/62/expected.json index b8e255f5e1..3b0389e5d0 100644 --- a/test/fixtures/core/uncategorised/62/expected.json +++ b/test/fixtures/core/uncategorised/62/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 4, "end": 6, "loc": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "range": [ + 0, + 4 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/63/expected.json b/test/fixtures/core/uncategorised/63/expected.json index b28ab11a53..291f749462 100644 --- a/test/fixtures/core/uncategorised/63/expected.json +++ b/test/fixtures/core/uncategorised/63/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 37, "end": 39, "loc": { @@ -105,5 +105,47 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " Hello, world!", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "range": [ + 0, + 16 + ] + }, + { + "type": "CommentLine", + "value": " Another hello", + "start": 18, + "end": 36, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 18 + } + }, + "range": [ + 18, + 36 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/65/expected.json b/test/fixtures/core/uncategorised/65/expected.json index 2ca6132248..2d16fc17b9 100644 --- a/test/fixtures/core/uncategorised/65/expected.json +++ b/test/fixtures/core/uncategorised/65/expected.json @@ -147,7 +147,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { @@ -168,5 +168,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": " perfect ", + "start": 27, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "range": [ + 27, + 40 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/66/expected.json b/test/fixtures/core/uncategorised/66/expected.json index 3c10744dbc..ee7c3c8a44 100644 --- a/test/fixtures/core/uncategorised/66/expected.json +++ b/test/fixtures/core/uncategorised/66/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 1, "loc": { diff --git a/test/fixtures/core/uncategorised/67/expected.json b/test/fixtures/core/uncategorised/67/expected.json index b5ce31672a..4e90f25295 100644 --- a/test/fixtures/core/uncategorised/67/expected.json +++ b/test/fixtures/core/uncategorised/67/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 1, "loc": { diff --git a/test/fixtures/core/uncategorised/68/expected.json b/test/fixtures/core/uncategorised/68/expected.json index 8197c99729..5c479ec64e 100644 --- a/test/fixtures/core/uncategorised/68/expected.json +++ b/test/fixtures/core/uncategorised/68/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 1, "loc": { diff --git a/test/fixtures/core/uncategorised/69/expected.json b/test/fixtures/core/uncategorised/69/expected.json index c9032e42b5..674c028642 100644 --- a/test/fixtures/core/uncategorised/69/expected.json +++ b/test/fixtures/core/uncategorised/69/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 2, "loc": { diff --git a/test/fixtures/core/uncategorised/70/expected.json b/test/fixtures/core/uncategorised/70/expected.json index 16bb765432..d8fd4c0959 100644 --- a/test/fixtures/core/uncategorised/70/expected.json +++ b/test/fixtures/core/uncategorised/70/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { diff --git a/test/fixtures/core/uncategorised/71/expected.json b/test/fixtures/core/uncategorised/71/expected.json index 77caa9f92d..c65f80bc71 100644 --- a/test/fixtures/core/uncategorised/71/expected.json +++ b/test/fixtures/core/uncategorised/71/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 7, "loc": { diff --git a/test/fixtures/core/uncategorised/72/expected.json b/test/fixtures/core/uncategorised/72/expected.json index 0e80f889c4..6c9bd55f71 100644 --- a/test/fixtures/core/uncategorised/72/expected.json +++ b/test/fixtures/core/uncategorised/72/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/73/expected.json b/test/fixtures/core/uncategorised/73/expected.json index a4929925aa..8aa93e63cc 100644 --- a/test/fixtures/core/uncategorised/73/expected.json +++ b/test/fixtures/core/uncategorised/73/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 15, "loc": { diff --git a/test/fixtures/core/uncategorised/74/expected.json b/test/fixtures/core/uncategorised/74/expected.json index 80d8d72652..532733a4dd 100644 --- a/test/fixtures/core/uncategorised/74/expected.json +++ b/test/fixtures/core/uncategorised/74/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { diff --git a/test/fixtures/core/uncategorised/75/expected.json b/test/fixtures/core/uncategorised/75/expected.json index 9fbcefb6e6..58b2f24c7a 100644 --- a/test/fixtures/core/uncategorised/75/expected.json +++ b/test/fixtures/core/uncategorised/75/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 6, "loc": { diff --git a/test/fixtures/core/uncategorised/76/expected.json b/test/fixtures/core/uncategorised/76/expected.json index 76c1f1c523..ceaa8c3a17 100644 --- a/test/fixtures/core/uncategorised/76/expected.json +++ b/test/fixtures/core/uncategorised/76/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 5, "loc": { diff --git a/test/fixtures/core/uncategorised/77/expected.json b/test/fixtures/core/uncategorised/77/expected.json index 0039bb62d0..f80d7c9cd5 100644 --- a/test/fixtures/core/uncategorised/77/expected.json +++ b/test/fixtures/core/uncategorised/77/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 5, "loc": { diff --git a/test/fixtures/core/uncategorised/78/expected.json b/test/fixtures/core/uncategorised/78/expected.json index 34f104d94a..75950798ba 100644 --- a/test/fixtures/core/uncategorised/78/expected.json +++ b/test/fixtures/core/uncategorised/78/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { diff --git a/test/fixtures/core/uncategorised/79/expected.json b/test/fixtures/core/uncategorised/79/expected.json index 60fe7b9e32..3ec2521ed5 100644 --- a/test/fixtures/core/uncategorised/79/expected.json +++ b/test/fixtures/core/uncategorised/79/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { diff --git a/test/fixtures/core/uncategorised/80/expected.json b/test/fixtures/core/uncategorised/80/expected.json index 656eba441e..c9510f36fa 100644 --- a/test/fixtures/core/uncategorised/80/expected.json +++ b/test/fixtures/core/uncategorised/80/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 5, "loc": { diff --git a/test/fixtures/core/uncategorised/81/expected.json b/test/fixtures/core/uncategorised/81/expected.json index 0f25cbbe5a..dd38ee8475 100644 --- a/test/fixtures/core/uncategorised/81/expected.json +++ b/test/fixtures/core/uncategorised/81/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { diff --git a/test/fixtures/core/uncategorised/82/expected.json b/test/fixtures/core/uncategorised/82/expected.json index a3d0753826..e4985f2b1e 100644 --- a/test/fixtures/core/uncategorised/82/expected.json +++ b/test/fixtures/core/uncategorised/82/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 2, "loc": { diff --git a/test/fixtures/core/uncategorised/83/expected.json b/test/fixtures/core/uncategorised/83/expected.json index 775be2d87f..8bb1dbdaf8 100644 --- a/test/fixtures/core/uncategorised/83/expected.json +++ b/test/fixtures/core/uncategorised/83/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { diff --git a/test/fixtures/core/uncategorised/84/expected.json b/test/fixtures/core/uncategorised/84/expected.json index 3d5cb353e0..74b4910c7c 100644 --- a/test/fixtures/core/uncategorised/84/expected.json +++ b/test/fixtures/core/uncategorised/84/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { diff --git a/test/fixtures/core/uncategorised/85/expected.json b/test/fixtures/core/uncategorised/85/expected.json index 8404808409..75243c6d6a 100644 --- a/test/fixtures/core/uncategorised/85/expected.json +++ b/test/fixtures/core/uncategorised/85/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 7, "loc": { diff --git a/test/fixtures/core/uncategorised/86/expected.json b/test/fixtures/core/uncategorised/86/expected.json index dcc47b071b..db9d18218f 100644 --- a/test/fixtures/core/uncategorised/86/expected.json +++ b/test/fixtures/core/uncategorised/86/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 22, "loc": { diff --git a/test/fixtures/core/uncategorised/87/expected.json b/test/fixtures/core/uncategorised/87/expected.json index 6fe6d8067b..21ac4d0633 100644 --- a/test/fixtures/core/uncategorised/87/expected.json +++ b/test/fixtures/core/uncategorised/87/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 8, "loc": { diff --git a/test/fixtures/core/uncategorised/88/expected.json b/test/fixtures/core/uncategorised/88/expected.json index 6dd6810aa8..d98bbbf345 100644 --- a/test/fixtures/core/uncategorised/88/expected.json +++ b/test/fixtures/core/uncategorised/88/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 6, "loc": { diff --git a/test/fixtures/core/uncategorised/89/expected.json b/test/fixtures/core/uncategorised/89/expected.json index 9cfa9faad2..fb56f80c47 100644 --- a/test/fixtures/core/uncategorised/89/expected.json +++ b/test/fixtures/core/uncategorised/89/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/9/expected.json b/test/fixtures/core/uncategorised/9/expected.json index 6cae01b125..bd8886934c 100644 --- a/test/fixtures/core/uncategorised/9/expected.json +++ b/test/fixtures/core/uncategorised/9/expected.json @@ -89,7 +89,7 @@ }, "elements": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 8, "loc": { diff --git a/test/fixtures/core/uncategorised/90/expected.json b/test/fixtures/core/uncategorised/90/expected.json index aaafd737c7..4b7d0df83e 100644 --- a/test/fixtures/core/uncategorised/90/expected.json +++ b/test/fixtures/core/uncategorised/90/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/91/expected.json b/test/fixtures/core/uncategorised/91/expected.json index 2e79d5b096..7f2af71438 100644 --- a/test/fixtures/core/uncategorised/91/expected.json +++ b/test/fixtures/core/uncategorised/91/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 15, "loc": { diff --git a/test/fixtures/core/uncategorised/92/expected.json b/test/fixtures/core/uncategorised/92/expected.json index d25c9ba139..36c8089dfa 100644 --- a/test/fixtures/core/uncategorised/92/expected.json +++ b/test/fixtures/core/uncategorised/92/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/93/expected.json b/test/fixtures/core/uncategorised/93/expected.json index 806ba7acba..73355963c0 100644 --- a/test/fixtures/core/uncategorised/93/expected.json +++ b/test/fixtures/core/uncategorised/93/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/94/expected.json b/test/fixtures/core/uncategorised/94/expected.json index 5b15026354..7fa2454d0e 100644 --- a/test/fixtures/core/uncategorised/94/expected.json +++ b/test/fixtures/core/uncategorised/94/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 17, "loc": { diff --git a/test/fixtures/core/uncategorised/95/expected.json b/test/fixtures/core/uncategorised/95/expected.json index e624d06929..f76c3f06ba 100644 --- a/test/fixtures/core/uncategorised/95/expected.json +++ b/test/fixtures/core/uncategorised/95/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/96/expected.json b/test/fixtures/core/uncategorised/96/expected.json index bd2f1ea9ac..e3c5d34073 100644 --- a/test/fixtures/core/uncategorised/96/expected.json +++ b/test/fixtures/core/uncategorised/96/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/97/expected.json b/test/fixtures/core/uncategorised/97/expected.json index 4ae045ff0c..313e3477d2 100644 --- a/test/fixtures/core/uncategorised/97/expected.json +++ b/test/fixtures/core/uncategorised/97/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/98/expected.json b/test/fixtures/core/uncategorised/98/expected.json index 9774cae16c..ec00b5c923 100644 --- a/test/fixtures/core/uncategorised/98/expected.json +++ b/test/fixtures/core/uncategorised/98/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/99/expected.json b/test/fixtures/core/uncategorised/99/expected.json index 09dd15f3b3..bdb5012bd7 100644 --- a/test/fixtures/core/uncategorised/99/expected.json +++ b/test/fixtures/core/uncategorised/99/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 14, "loc": { diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json index 54b06ec57a..b3c4b6a133 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json @@ -89,7 +89,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { @@ -138,7 +138,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json index 417879a077..253be28d97 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json index 22f542ddac..567f02ad8f 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json index d4241aabc4..b094efe11f 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json index 6f55ed4658..be91d94441 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json index aaf8f84a1d..2fc3f311ee 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json index cae3efe70d..6720b43723 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/declaration-const/migrated_0000/expected.json b/test/fixtures/esprima/declaration-const/migrated_0000/expected.json index 7a3105b73c..dcf8a26650 100644 --- a/test/fixtures/esprima/declaration-const/migrated_0000/expected.json +++ b/test/fixtures/esprima/declaration-const/migrated_0000/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { diff --git a/test/fixtures/esprima/declaration-const/migrated_0001/expected.json b/test/fixtures/esprima/declaration-const/migrated_0001/expected.json index 80198c2546..8b63e6bb33 100644 --- a/test/fixtures/esprima/declaration-const/migrated_0001/expected.json +++ b/test/fixtures/esprima/declaration-const/migrated_0001/expected.json @@ -89,7 +89,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { diff --git a/test/fixtures/esprima/declaration-const/migrated_0002/expected.json b/test/fixtures/esprima/declaration-const/migrated_0002/expected.json index 79a7b04629..55718cfc43 100644 --- a/test/fixtures/esprima/declaration-const/migrated_0002/expected.json +++ b/test/fixtures/esprima/declaration-const/migrated_0002/expected.json @@ -89,7 +89,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { @@ -138,7 +138,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 20, "end": 21, "loc": { @@ -187,7 +187,7 @@ "name": "z" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 27, "end": 31, "loc": { diff --git a/test/fixtures/esprima/declaration-function/empty-param/expected.json b/test/fixtures/esprima/declaration-function/empty-param/expected.json index 546a1c4026..959d6454f7 100644 --- a/test/fixtures/esprima/declaration-function/empty-param/expected.json +++ b/test/fixtures/esprima/declaration-function/empty-param/expected.json @@ -124,7 +124,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 20, "end": 32, "loc": { diff --git a/test/fixtures/esprima/declaration-function/migrated_0005/expected.json b/test/fixtures/esprima/declaration-function/migrated_0005/expected.json index c1db4cf35a..f5013969f2 100644 --- a/test/fixtures/esprima/declaration-function/migrated_0005/expected.json +++ b/test/fixtures/esprima/declaration-function/migrated_0005/expected.json @@ -139,7 +139,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 37, "end": 49, "loc": { diff --git a/test/fixtures/esprima/declaration-function/migrated_0014/expected.json b/test/fixtures/esprima/declaration-function/migrated_0014/expected.json index 72f253f625..13d9c39d33 100644 --- a/test/fixtures/esprima/declaration-function/migrated_0014/expected.json +++ b/test/fixtures/esprima/declaration-function/migrated_0014/expected.json @@ -105,7 +105,7 @@ } }, "left": { - "type": "Literal", + "type": "StringLiteral", "start": 18, "end": 30, "loc": { @@ -124,7 +124,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 33, "end": 35, "loc": { diff --git a/test/fixtures/esprima/declaration-let/migrated_0002/expected.json b/test/fixtures/esprima/declaration-let/migrated_0002/expected.json index 421e69547d..d6c387f1cf 100644 --- a/test/fixtures/esprima/declaration-let/migrated_0002/expected.json +++ b/test/fixtures/esprima/declaration-let/migrated_0002/expected.json @@ -89,7 +89,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { diff --git a/test/fixtures/esprima/declaration-let/migrated_0003/expected.json b/test/fixtures/esprima/declaration-let/migrated_0003/expected.json index 1614fceb4c..4159969a48 100644 --- a/test/fixtures/esprima/declaration-let/migrated_0003/expected.json +++ b/test/fixtures/esprima/declaration-let/migrated_0003/expected.json @@ -89,7 +89,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { @@ -138,7 +138,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { @@ -187,7 +187,7 @@ "name": "z" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 25, "end": 29, "loc": { diff --git a/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json b/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json index 6fc51fdb6d..c18fa769b5 100644 --- a/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json +++ b/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json @@ -104,7 +104,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 15, "end": 30, "loc": { diff --git a/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json b/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json index 97967a7597..32deb8d4e2 100644 --- a/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json +++ b/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json @@ -104,7 +104,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 15, "end": 28, "loc": { diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/expected.json b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/expected.json index aac755fdd7..a37dc71384 100644 --- a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/expected.json +++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/expected.json @@ -110,7 +110,7 @@ }, "elements": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/expected.json b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/expected.json index acb3c68692..3952075405 100644 --- a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/expected.json +++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/expected.json @@ -111,7 +111,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/expected.json b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/expected.json index bb4d92fc83..c80e27a7c8 100644 --- a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/expected.json +++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/expected.json @@ -126,7 +126,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/expected.json b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/expected.json index 055970fd64..11686156c6 100644 --- a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/expected.json +++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json b/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json index 7c9c32e1c5..3f3f6aa64d 100644 --- a/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json +++ b/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json @@ -81,7 +81,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/elision/expected.json b/test/fixtures/esprima/es2015-array-pattern/elision/expected.json index f0c82eec3f..13bbbbceac 100644 --- a/test/fixtures/esprima/es2015-array-pattern/elision/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/elision/expected.json @@ -91,7 +91,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 12, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json index 536a85d158..2c1b12478e 100644 --- a/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json @@ -74,7 +74,7 @@ "elements": [] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/hole/expected.json b/test/fixtures/esprima/es2015-array-pattern/hole/expected.json index 44ee381630..8dfe71997b 100644 --- a/test/fixtures/esprima/es2015-array-pattern/hole/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/hole/expected.json @@ -108,7 +108,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 12, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json b/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json index 5d80c8dd9c..d06abc7113 100644 --- a/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json @@ -91,7 +91,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json b/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json index 0a028a82f1..df31ae2fcd 100644 --- a/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json @@ -249,7 +249,7 @@ "name": "e" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 28, "end": 29, "loc": { @@ -333,7 +333,7 @@ "name": "g" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 37, "end": 38, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/rest/expected.json b/test/fixtures/esprima/es2015-array-pattern/rest/expected.json index 7118bc2683..cb533f681d 100644 --- a/test/fixtures/esprima/es2015-array-pattern/rest/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/rest/expected.json @@ -106,7 +106,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 14, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json b/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json index 695be41271..c2fa502238 100644 --- a/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json @@ -92,7 +92,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/expected.json b/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/expected.json index b45bc367e9..2726675278 100644 --- a/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/expected.json @@ -118,7 +118,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 20, "end": 21, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json b/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json index da1c0b9799..48546eeb6c 100644 --- a/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json @@ -107,7 +107,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 15, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json b/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json index d7d0077c3d..982603fb4d 100644 --- a/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json @@ -143,7 +143,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/expected.json b/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/expected.json index 878f8d67a9..6e488ff2b1 100644 --- a/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/expected.json @@ -125,7 +125,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 15, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json b/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json index 7528bfa144..79abe75001 100644 --- a/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json @@ -93,7 +93,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json index cdf259a636..ed4c1605fe 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json @@ -61,7 +61,7 @@ "expression": true, "params": [], "body": { - "type": "Literal", + "type": "StringLiteral", "start": 6, "end": 12, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json index fd76eb8af9..c3e068731d 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "StringLiteral", "start": 5, "end": 11, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json index 1b9cab7e5c..dc38971fa7 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "StringLiteral", "start": 7, "end": 13, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json index 5a88aff7cb..4bdd74c258 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json @@ -94,7 +94,7 @@ } ], "body": { - "type": "Literal", + "type": "StringLiteral", "start": 10, "end": 16, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json index a8c79cf5fc..ebd04a794b 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json @@ -107,7 +107,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json index 616b8e8a5b..7a3afe8bd4 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json @@ -126,7 +126,7 @@ "name": "property" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 20, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json index be00941649..287f532194 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json @@ -121,7 +121,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 16, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json index f79a8f0276..9a918edee0 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json @@ -123,7 +123,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json index 7ad095e070..8b3e1161d1 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json @@ -91,7 +91,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 3, "end": 4, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json index c45a0f326b..3351297bbe 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json index 6af42ac3f5..cdb3afb5bc 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 15, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json index 79998f9b16..c40f9bbb31 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json index 09c80c6f1e..95224d5129 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json @@ -94,7 +94,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 15, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json index 7549259432..645860e175 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json @@ -91,7 +91,7 @@ "name": "eval" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { @@ -111,7 +111,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json index 6ea224db79..fd39c13ced 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json @@ -107,7 +107,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { @@ -127,7 +127,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 20, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json index 8a76cf1c16..8368737c3f 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json @@ -113,7 +113,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json index d75e50e145..607cd3e194 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json index 87c4066eaf..23356e76be 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json index 15344e54fd..be3c47afa8 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json index 25eeb9786f..ae57cab25c 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json index d42f8407c2..4937dfc854 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json index 6f8f49f4e1..e6cfe9f05a 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { diff --git a/test/fixtures/esprima/es2015-class/migrated_0001/expected.json b/test/fixtures/esprima/es2015-class/migrated_0001/expected.json index 99cd27794e..0f5ada00b1 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0001/expected.json @@ -59,7 +59,7 @@ "name": "A" }, "superClass": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 17, "loc": { diff --git a/test/fixtures/esprima/es2015-class/migrated_0016/expected.json b/test/fixtures/esprima/es2015-class/migrated_0016/expected.json index 150f14ca4c..0048caa7d4 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0016/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0016/expected.json @@ -104,7 +104,7 @@ "name": "A" }, "superClass": { - "type": "Literal", + "type": "NumberLiteral", "start": 24, "end": 25, "loc": { diff --git a/test/fixtures/esprima/es2015-class/migrated_0019/expected.json b/test/fixtures/esprima/es2015-class/migrated_0019/expected.json index 8b28390427..c7f6cadc22 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0019/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0019/expected.json @@ -90,7 +90,7 @@ }, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 9, "end": 22, "loc": { @@ -161,7 +161,7 @@ }, "computed": true, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 28, "end": 41, "loc": { diff --git a/test/fixtures/esprima/es2015-class/migrated_0021/expected.json b/test/fixtures/esprima/es2015-class/migrated_0021/expected.json index 0d65fe2441..90ed6197ca 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0021/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0021/expected.json @@ -90,7 +90,7 @@ }, "computed": true, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 28, "loc": { diff --git a/test/fixtures/esprima/es2015-class/migrated_0024/expected.json b/test/fixtures/esprima/es2015-class/migrated_0024/expected.json index 897b90b1c4..0805cc723d 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0024/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0024/expected.json @@ -58,7 +58,7 @@ }, "id": null, "superClass": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 16, "loc": { diff --git a/test/fixtures/esprima/es2015-class/migrated_0025/expected.json b/test/fixtures/esprima/es2015-class/migrated_0025/expected.json index 80a74cd675..6b475a1756 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0025/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0025/expected.json @@ -73,7 +73,7 @@ "name": "A" }, "superClass": { - "type": "Literal", + "type": "NumberLiteral", "start": 17, "end": 18, "loc": { diff --git a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json index 8b22c0b26b..8f7d2304f4 100644 --- a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json @@ -122,7 +122,7 @@ "name": "y" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 17, "end": 18, "loc": { diff --git a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json index 8cbbeeddbb..beb32095e0 100644 --- a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json @@ -92,7 +92,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 16, "loc": { diff --git a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json index 4f349927b9..133d3320bc 100644 --- a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json @@ -170,7 +170,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 20, "end": 21, "loc": { diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/expected.json index 574f634dc3..dcc67edb83 100644 --- a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/expected.json +++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/expected.json @@ -139,7 +139,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json index e56c4d8f57..734b745fab 100644 --- a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json +++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json @@ -77,7 +77,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 6, "loc": { diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/expected.json index 80579906b4..efd854b233 100644 --- a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/expected.json +++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/expected.json @@ -117,7 +117,7 @@ "name": "a" }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { @@ -140,7 +140,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json index b274610e61..63881f8131 100644 --- a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json +++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json @@ -119,7 +119,7 @@ "name": "b" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 6, "loc": { @@ -227,7 +227,7 @@ "name": "a" }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 16, "loc": { @@ -269,7 +269,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 24, "loc": { diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/expected.json index 335b17c62c..72f41b4fa2 100644 --- a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/expected.json +++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/expected.json @@ -172,7 +172,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 8, "loc": { diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json index 04a63a3079..17e17c57fe 100644 --- a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json +++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json @@ -91,7 +91,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/expected.json index 71ff2e0702..100e7a3484 100644 --- a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/expected.json +++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/expected.json @@ -74,7 +74,7 @@ "properties": [] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/expected.json index 65409260c0..a140649c5e 100644 --- a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/expected.json +++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/expected.json @@ -467,7 +467,7 @@ "name": "b" }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 25, "end": 26, "loc": { @@ -531,7 +531,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 49, "end": 50, "loc": { diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/expected.json index 1689a3fe18..17e21344b3 100644 --- a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/expected.json +++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/expected.json @@ -543,7 +543,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 82, "end": 83, "loc": { diff --git a/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json index 3291034455..49034362d5 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json @@ -90,7 +90,7 @@ "name": "foo" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 19, "end": 20, "loc": { diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json index 81384a8a1d..79dccfed7b 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json @@ -57,7 +57,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 17, "loc": { @@ -76,7 +76,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 20, "end": 21, "loc": { diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json index b0579df273..440498ffc2 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json @@ -43,7 +43,7 @@ } }, "declaration": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json index 3881690753..44f93db202 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json @@ -91,7 +91,7 @@ "name": "foo" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 22, "end": 23, "loc": { diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json index c23e216897..5c1b86ad08 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json @@ -43,7 +43,7 @@ } }, "source": { - "type": "Literal", + "type": "StringLiteral", "start": 14, "end": 19, "loc": { diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json index 9b94e4de83..d87b9e3ad0 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json @@ -93,7 +93,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 22, "end": 27, "loc": { diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/expected.json index 1f80e99f3b..db67cc7139 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/expected.json @@ -93,7 +93,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 29, "end": 34, "loc": { diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/expected.json index 263e8769d4..2cf90b4252 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/expected.json @@ -93,7 +93,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 25, "end": 30, "loc": { diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/expected.json index 39ad36c9ac..dace6e4467 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/expected.json @@ -140,7 +140,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 34, "end": 39, "loc": { diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json index 37e27ba6b1..a8b61d3f41 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json @@ -93,7 +93,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 18, "end": 23, "loc": { diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json index 90f8b953b5..71f75f58fb 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json @@ -140,7 +140,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 23, "end": 28, "loc": { diff --git a/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json index a3474dbd50..c6b1bd5169 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json @@ -110,7 +110,7 @@ } }, "expression": { - "type": "Literal", + "type": "BooleanLiteral", "start": 26, "end": 31, "loc": { diff --git a/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json index 63b6fdfeec..5801f4b21d 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json @@ -90,7 +90,7 @@ "name": "foo" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 17, "end": 18, "loc": { diff --git a/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json index af2ce633cb..9ebf178806 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json @@ -90,7 +90,7 @@ "name": "foo" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 17, "end": 18, "loc": { diff --git a/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/expected.json b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/expected.json index ed91c27238..f038000230 100644 --- a/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/expected.json @@ -106,7 +106,7 @@ }, "delegate": true, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 25, "end": 26, "loc": { diff --git a/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json index 1e6854a12e..3dc0ce6afb 100644 --- a/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json @@ -106,7 +106,7 @@ }, "delegate": false, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 24, "end": 25, "loc": { diff --git a/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json b/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json index aada6e0350..273c61ba5e 100644 --- a/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json @@ -105,7 +105,7 @@ }, "delegate": false, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 21, "end": 22, "loc": { diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/expected.json b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/expected.json index 86f538137e..4085e3da1c 100644 --- a/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/expected.json @@ -154,7 +154,7 @@ }, "delegate": true, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 19, "end": 20, "loc": { diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/expected.json b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/expected.json index 652e20d1b3..1696922399 100644 --- a/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/expected.json @@ -154,7 +154,7 @@ }, "delegate": false, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/expected.json b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/expected.json index 4fc6768637..a207539d69 100644 --- a/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/expected.json @@ -171,7 +171,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 24, "loc": { diff --git a/test/fixtures/esprima/es2015-identifier/module_await/expected.json b/test/fixtures/esprima/es2015-identifier/module_await/expected.json index 9ceb584ddd..eff37004fc 100644 --- a/test/fixtures/esprima/es2015-identifier/module_await/expected.json +++ b/test/fixtures/esprima/es2015-identifier/module_await/expected.json @@ -74,7 +74,7 @@ "name": "await" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/expected.json index edc235cd14..fd674134a4 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/expected.json @@ -123,7 +123,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 23, "end": 28, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/expected.json index f4121da033..c83ff40f18 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/expected.json @@ -107,7 +107,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 26, "end": 31, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json index ef53af8608..073f43503c 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json @@ -92,7 +92,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 29, "end": 34, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json index f65d947db8..691a530e45 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json @@ -76,7 +76,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 16, "end": 21, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json index 5466ba5614..45b87643fb 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json @@ -76,7 +76,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 14, "end": 22, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json index bb56815106..652a62b72a 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json @@ -44,7 +44,7 @@ }, "specifiers": [], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 7, "end": 12, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/expected.json index 58842b0c0d..4198564920 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/expected.json @@ -92,7 +92,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 25, "end": 30, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/expected.json index b063a99cd2..197fd882b6 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/expected.json @@ -139,7 +139,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 30, "end": 35, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json index a896b50ab1..45f291208c 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json @@ -44,7 +44,7 @@ }, "specifiers": [], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 15, "end": 20, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json index 6a3be9f6d3..5c0b3036c9 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json @@ -92,7 +92,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 18, "end": 23, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/expected.json index 2913832639..1dd153305f 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/expected.json @@ -139,7 +139,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 24, "end": 29, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json index f5152845f5..afcf5e6751 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json @@ -139,7 +139,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 23, "end": 28, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json index 27b3e13863..7a3783c90d 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json @@ -76,7 +76,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 21, "end": 26, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/expected.json index 20286c5ce1..166aaf0ed8 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/expected.json @@ -92,7 +92,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 28, "end": 33, "loc": { diff --git a/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json b/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json index 9cb6015642..e61945111a 100644 --- a/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json @@ -120,7 +120,7 @@ "name": "t" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 35, "end": 37, "loc": { @@ -159,7 +159,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json b/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json index c05da73d96..29fd63476c 100644 --- a/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 6, "end": 14, "loc": { diff --git a/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-getter-literal-identifier/expected.json b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-getter-literal-identifier/expected.json new file mode 100644 index 0000000000..6edbb3623f --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-getter-literal-identifier/expected.json @@ -0,0 +1,238 @@ +{ + "type": "File", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 58 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 1, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "properties": [ + { + "type": "Property", + "start": 3, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 7, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "__proto" + }, + "kind": "get", + "value": { + "type": "FunctionExpression", + "start": 14, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 16, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "body": [] + } + } + }, + { + "type": "Property", + "start": 20, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "StringLiteral", + "start": 20, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": "__proto__", + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": { + "type": "NullLiteral", + "start": 33, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 37 + } + } + }, + "kind": "init" + }, + { + "type": "Property", + "start": 39, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 39 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 39, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 39 + }, + "end": { + "line": 1, + "column": 48 + } + }, + "name": "__proto__" + }, + "value": { + "type": "NullLiteral", + "start": 50, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 50 + }, + "end": { + "line": 1, + "column": 54 + } + } + }, + "kind": "init" + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-literal/expected.json b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-literal/expected.json new file mode 100644 index 0000000000..9b1a68cb99 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-literal/expected.json @@ -0,0 +1,168 @@ +{ + "type": "File", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 1, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "properties": [ + { + "type": "Property", + "start": 3, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 3, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "name": "__proto__" + }, + "value": { + "type": "NullLiteral", + "start": 14, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "kind": "init" + }, + { + "type": "Property", + "start": 20, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "StringLiteral", + "start": 20, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": "__proto__", + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": { + "type": "NullLiteral", + "start": 33, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 37 + } + } + }, + "kind": "init" + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-identifier/expected.json b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-identifier/expected.json new file mode 100644 index 0000000000..4b2175d058 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-identifier/expected.json @@ -0,0 +1,168 @@ +{ + "type": "File", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 1, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "properties": [ + { + "type": "Property", + "start": 3, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "StringLiteral", + "start": 3, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": "__proto__", + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": { + "type": "NullLiteral", + "start": 16, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "kind": "init" + }, + { + "type": "Property", + "start": 22, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 22, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "name": "__proto__" + }, + "value": { + "type": "NullLiteral", + "start": 33, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 37 + } + } + }, + "kind": "init" + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literals/expected.json b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literals/expected.json new file mode 100644 index 0000000000..2a84426d88 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literals/expected.json @@ -0,0 +1,170 @@ +{ + "type": "File", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 1, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "properties": [ + { + "type": "Property", + "start": 3, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "StringLiteral", + "start": 3, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": "__proto__", + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": { + "type": "NullLiteral", + "start": 16, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "kind": "init" + }, + { + "type": "Property", + "start": 22, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "StringLiteral", + "start": 22, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "value": "__proto__", + "rawValue": "__proto__", + "raw": "'__proto__'" + }, + "value": { + "type": "NullLiteral", + "start": 35, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 39 + } + } + }, + "kind": "init" + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-setter-literal-identifier/expected.json b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-setter-literal-identifier/expected.json new file mode 100644 index 0000000000..7120e7bc0a --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-setter-literal-identifier/expected.json @@ -0,0 +1,255 @@ +{ + "type": "File", + "start": 0, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 61, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 61 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 1, + "end": 60, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 60 + } + }, + "properties": [ + { + "type": "Property", + "start": 3, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 7, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "name": "__proto__" + }, + "kind": "set", + "value": { + "type": "FunctionExpression", + "start": 16, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "id": null, + "generator": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "name": "x" + } + ], + "body": { + "type": "BlockStatement", + "start": 19, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "body": [] + } + } + }, + { + "type": "Property", + "start": 23, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "StringLiteral", + "start": 23, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "value": "__proto__", + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": { + "type": "NullLiteral", + "start": 36, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 40 + } + } + }, + "kind": "init" + }, + { + "type": "Property", + "start": 42, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 42, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "name": "__proto__" + }, + "value": { + "type": "NullLiteral", + "start": 53, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 53 + }, + "end": { + "line": 1, + "column": 57 + } + } + }, + "kind": "init" + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/expected.json index 226684195f..e61c4bc6c6 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/expected.json @@ -91,7 +91,7 @@ "name": "__proto__" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 14, "end": 18, "loc": { @@ -103,10 +103,7 @@ "line": 1, "column": 18 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json index 799d51e116..10aa2e429a 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json @@ -91,7 +91,7 @@ "name": "__proto__" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 14, "end": 18, "loc": { @@ -103,10 +103,7 @@ "line": 1, "column": 18 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json index 12192e3584..fb0485d90d 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json @@ -91,7 +91,7 @@ "name": "__proto__" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 14, "end": 18, "loc": { @@ -103,10 +103,7 @@ "line": 1, "column": 18 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json index b85b34999c..b112cc6b98 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json @@ -91,7 +91,7 @@ "name": "__proto__" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 14, "end": 18, "loc": { @@ -103,10 +103,7 @@ "line": 1, "column": 18 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/expected.json index fb52590573..3a347ec1c3 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/expected.json @@ -75,7 +75,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 3, "end": 14, "loc": { @@ -93,7 +93,7 @@ "raw": "\"__proto__\"" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 16, "end": 20, "loc": { @@ -105,10 +105,7 @@ "line": 1, "column": 20 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json index 981e9ca6a1..ec071f8f38 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json @@ -75,7 +75,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 3, "end": 14, "loc": { @@ -93,7 +93,7 @@ "raw": "\"__proto__\"" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 16, "end": 20, "loc": { @@ -105,10 +105,7 @@ "line": 1, "column": 20 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json index aaff700170..a37ebb0e39 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json @@ -75,7 +75,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 3, "end": 14, "loc": { @@ -93,7 +93,7 @@ "raw": "\"__proto__\"" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 16, "end": 20, "loc": { @@ -105,10 +105,7 @@ "line": 1, "column": 20 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json index 92e920ccdd..5300afd3aa 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json @@ -75,7 +75,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 3, "end": 14, "loc": { @@ -93,7 +93,7 @@ "raw": "\"__proto__\"" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 16, "end": 20, "loc": { @@ -105,10 +105,7 @@ "line": 1, "column": 20 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, diff --git a/test/fixtures/esprima/es2015-object-pattern/elision/expected.json b/test/fixtures/esprima/es2015-object-pattern/elision/expected.json index 7b239f85db..28f02d871c 100644 --- a/test/fixtures/esprima/es2015-object-pattern/elision/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/elision/expected.json @@ -126,7 +126,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 12, "loc": { diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json b/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json index d3ba43788a..dd2b8aee4b 100644 --- a/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json @@ -93,7 +93,7 @@ "kind": "let" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 16, "loc": { diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json b/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json index dbbd5e0895..194a2277c7 100644 --- a/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json @@ -74,7 +74,7 @@ "properties": [] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json b/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json index 24ff27c2f1..cf2b1a4c73 100644 --- a/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json @@ -74,7 +74,7 @@ "properties": [] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { diff --git a/test/fixtures/esprima/es2015-object-pattern/nested/expected.json b/test/fixtures/esprima/es2015-object-pattern/nested/expected.json index 1e70efa276..bcf6c6414e 100644 --- a/test/fixtures/esprima/es2015-object-pattern/nested/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/nested/expected.json @@ -126,7 +126,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 14, "loc": { diff --git a/test/fixtures/esprima/es2015-object-pattern/properties/expected.json b/test/fixtures/esprima/es2015-object-pattern/properties/expected.json index 3540998633..e35d04f735 100644 --- a/test/fixtures/esprima/es2015-object-pattern/properties/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/properties/expected.json @@ -188,7 +188,7 @@ "name": "b" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { @@ -322,7 +322,7 @@ "name": "f" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 19, "end": 20, "loc": { @@ -413,7 +413,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 30, "end": 31, "loc": { diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json index 7071e2971b..1e3d179cd6 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 2, "loc": { diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json index 198d34971a..ccdde2fe5f 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json index 205a96ab16..b8fdcdd6b2 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json @@ -91,7 +91,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 29, "loc": { @@ -124,7 +124,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 31, "end": 34, "loc": { diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json index 5e0a93482f..58c5a75980 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json index 99d27ef22c..fc506965ec 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json index b97a7679b0..0e4a704196 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json index e3ee2c9f37..ed92c39059 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json @@ -91,7 +91,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 29, "loc": { @@ -124,7 +124,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 31, "end": 34, "loc": { diff --git a/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json b/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json index 0b852348e3..7c3f550db9 100644 --- a/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json +++ b/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json @@ -88,7 +88,7 @@ } }, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json b/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json index f0ce7bb220..0e3260dc1b 100644 --- a/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json +++ b/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json @@ -88,7 +88,7 @@ } }, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 11, "loc": { diff --git a/test/fixtures/esprima/es2015-super-property/super_computed/expected.json b/test/fixtures/esprima/es2015-super-property/super_computed/expected.json index ff1ee7f02a..d70c83f48b 100644 --- a/test/fixtures/esprima/es2015-super-property/super_computed/expected.json +++ b/test/fixtures/esprima/es2015-super-property/super_computed/expected.json @@ -199,7 +199,7 @@ } }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 51, "end": 52, "loc": { diff --git a/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json b/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json index 0dade7f955..6257eab282 100644 --- a/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json +++ b/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 45, "loc": { diff --git a/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json b/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json index a2c5419a32..8119243646 100644 --- a/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json +++ b/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 23, "loc": { diff --git a/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json b/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json index aa36f4ccae..84b416c9b8 100644 --- a/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json +++ b/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 50, "loc": { diff --git a/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/expected.json b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/expected.json index 8572ac41d4..0ac274c801 100644 --- a/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 35, "loc": { diff --git a/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/expected.json b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/expected.json index 0192886854..319843f197 100644 --- a/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 45, "loc": { diff --git a/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/expected.json b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/expected.json index 965abbf51a..e2ea996f44 100644 --- a/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 33, "loc": { diff --git a/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json index 4fdb12deff..c1d8db8a5f 100644 --- a/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { diff --git a/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json b/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json index dec93c479a..950f430f09 100644 --- a/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json @@ -74,7 +74,7 @@ "name": "yield" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { @@ -93,7 +93,7 @@ } } ], - "kind": "var" + "kind": "let" } ] } diff --git a/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json b/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json index cff6332edb..b3a07a17aa 100644 --- a/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 12, "loc": { diff --git a/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json b/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json index 73ba30aca8..dc762096f1 100644 --- a/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 12, "loc": { diff --git a/test/fixtures/esprima/expression-additive/migrated_0002/expected.json b/test/fixtures/esprima/expression-additive/migrated_0002/expected.json index d3ad9d674b..8adc9b67d6 100644 --- a/test/fixtures/esprima/expression-additive/migrated_0002/expected.json +++ b/test/fixtures/esprima/expression-additive/migrated_0002/expected.json @@ -57,7 +57,7 @@ } }, "left": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 12, "loc": { @@ -76,7 +76,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json index dcfe85d992..886a4c91ba 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 4, "end": 6, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json index 32e9683fad..087953e749 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json @@ -74,7 +74,7 @@ "name": "eval" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json index aadc603158..c40cefe77a 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json @@ -74,7 +74,7 @@ "name": "arguments" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json index c68b13b4a8..77c0b3f6fd 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json index 2a2e320c76..3ea5616140 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json index f61cd91960..3bb965131c 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json index d87bd7221e..623bec2d65 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json index 58ac4f76d5..169b55b357 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json index 6aec1fd6ae..395bbc5959 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 8, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json index 2afa7f1ab0..f2baaf2d7c 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 8, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json index 34ae7fde25..63767ff44b 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json index a97d4cb79e..22bf53cf58 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json index 7a092cae1b..52cfe31685 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json index 0c297787a4..0cb0e23497 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json b/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json index 355a73a1ad..9252297ac7 100644 --- a/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json +++ b/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json @@ -73,7 +73,7 @@ "name": "y" }, "consequent": { - "type": "Literal", + "type": "NumberLiteral", "start": 4, "end": 5, "loc": { @@ -91,7 +91,7 @@ "raw": "1" }, "alternate": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { diff --git a/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json b/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json index 618615ef5f..6d0cf5e9ff 100644 --- a/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json +++ b/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json @@ -105,7 +105,7 @@ } }, "consequent": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { @@ -123,7 +123,7 @@ "raw": "1" }, "alternate": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 14, "loc": { diff --git a/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json b/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json index 3875482cdf..9d2c4afc3f 100644 --- a/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json +++ b/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json @@ -88,7 +88,7 @@ } }, "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 6, "loc": { @@ -107,7 +107,7 @@ "parenthesizedExpression": true }, "consequent": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { @@ -125,7 +125,7 @@ "raw": "1" }, "alternate": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 15, "loc": { diff --git a/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json b/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json index 68090be774..a926bd6ac4 100644 --- a/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json +++ b/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json @@ -71,7 +71,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 1, "end": 2, "loc": { @@ -91,7 +91,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 8, "loc": { @@ -112,7 +112,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 15, "loc": { diff --git a/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json b/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json index df6409e3a6..efa51994a8 100644 --- a/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json +++ b/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json @@ -71,7 +71,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 1, "loc": { @@ -90,7 +90,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 4, "end": 5, "loc": { @@ -110,7 +110,7 @@ }, "operator": "<<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json index cca9b0fc82..f26ab8b935 100644 --- a/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json @@ -87,7 +87,7 @@ "name": "universe" }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 11, "loc": { diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json index 463a77c2e5..624c7b81b9 100644 --- a/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json @@ -88,7 +88,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 11, "loc": { diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json index fab1521321..23d090fedc 100644 --- a/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json @@ -116,7 +116,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 11, "loc": { @@ -155,7 +155,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 22, "end": 24, "loc": { @@ -173,7 +173,7 @@ "raw": "14" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 26, "end": 27, "loc": { @@ -191,7 +191,7 @@ "raw": "3" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 29, "end": 31, "loc": { diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json index 762a4f980c..080068549b 100644 --- a/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json @@ -170,7 +170,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 40, "end": 44, "loc": { diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0035/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0035/expected.json new file mode 100644 index 0000000000..798f613862 --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0035/expected.json @@ -0,0 +1,102 @@ +{ + "type": "File", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "sourceType": "script", + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + }, + "name": "x" + }, + "init": { + "type": "Literal", + "start": 8, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "raw": "/(s/g", + "regex": { + "pattern": "(s", + "flags": "g" + } + } + } + ], + "kind": "var" + } + ] + } +} \ No newline at end of file diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0092/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0092/options.json index 167116741e..0590c2b7e6 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0092/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0092/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:7)" -} \ No newline at end of file + "throws": "Argument name clash in strict mode (1:4)" +} diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json index b3e95a5757..69a9237df8 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json @@ -1,3 +1,3 @@ { - "throws": "Binding static in strict mode (1:23)" + "throws": "The keyword 'static' is reserved (1:23)" } diff --git a/test/fixtures/esprima/statement-break/migrated_0000/expected.json b/test/fixtures/esprima/statement-break/migrated_0000/expected.json index 1d9fe4c071..15042df691 100644 --- a/test/fixtures/esprima/statement-break/migrated_0000/expected.json +++ b/test/fixtures/esprima/statement-break/migrated_0000/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/statement-break/migrated_0001/expected.json b/test/fixtures/esprima/statement-break/migrated_0001/expected.json index de1ad554fa..be48009734 100644 --- a/test/fixtures/esprima/statement-break/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-break/migrated_0001/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 13, "end": 17, "loc": { diff --git a/test/fixtures/esprima/statement-break/migrated_0002/expected.json b/test/fixtures/esprima/statement-break/migrated_0002/expected.json index 62a3160e6e..6c31c586d6 100644 --- a/test/fixtures/esprima/statement-break/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-break/migrated_0002/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 13, "end": 17, "loc": { diff --git a/test/fixtures/esprima/statement-break/migrated_0003/expected.json b/test/fixtures/esprima/statement-break/migrated_0003/expected.json index afc5d3b147..650a39cbce 100644 --- a/test/fixtures/esprima/statement-break/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-break/migrated_0003/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 18, "end": 22, "loc": { diff --git a/test/fixtures/esprima/statement-continue/migrated_0000/expected.json b/test/fixtures/esprima/statement-continue/migrated_0000/expected.json index 9ea0854331..40763456b0 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0000/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0000/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/statement-continue/migrated_0001/expected.json b/test/fixtures/esprima/statement-continue/migrated_0001/expected.json index 3cadc13b16..bfea074cf1 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0001/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/statement-continue/migrated_0002/expected.json b/test/fixtures/esprima/statement-continue/migrated_0002/expected.json index 661b7b9d0a..f43031468c 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0002/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 13, "end": 17, "loc": { diff --git a/test/fixtures/esprima/statement-continue/migrated_0003/expected.json b/test/fixtures/esprima/statement-continue/migrated_0003/expected.json index 3c06ab2a96..3b684f46cb 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0003/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 13, "end": 17, "loc": { diff --git a/test/fixtures/esprima/statement-continue/migrated_0004/expected.json b/test/fixtures/esprima/statement-continue/migrated_0004/expected.json index 9df58ecc04..6c809ee4ec 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0004/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0004/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 18, "end": 22, "loc": { diff --git a/test/fixtures/esprima/statement-expression/migrated_0002/expected.json b/test/fixtures/esprima/statement-expression/migrated_0002/expected.json index 6ba5acf72c..5456f44f4a 100644 --- a/test/fixtures/esprima/statement-expression/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-expression/migrated_0002/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 22, "loc": { diff --git a/test/fixtures/esprima/statement-expression/migrated_0003/expected.json b/test/fixtures/esprima/statement-expression/migrated_0003/expected.json index f78a5fc028..93af56eb06 100644 --- a/test/fixtures/esprima/statement-expression/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-expression/migrated_0003/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 23, "loc": { diff --git a/test/fixtures/esprima/statement-expression/migrated_0004/expected.json b/test/fixtures/esprima/statement-expression/migrated_0004/expected.json index cf73b407c2..ddf30e2b43 100644 --- a/test/fixtures/esprima/statement-expression/migrated_0004/expected.json +++ b/test/fixtures/esprima/statement-expression/migrated_0004/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 23, "loc": { diff --git a/test/fixtures/esprima/statement-expression/migrated_0005/expected.json b/test/fixtures/esprima/statement-expression/migrated_0005/expected.json index ab84cdb1ac..eee513b5d0 100644 --- a/test/fixtures/esprima/statement-expression/migrated_0005/expected.json +++ b/test/fixtures/esprima/statement-expression/migrated_0005/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 24, "loc": { diff --git a/test/fixtures/esprima/statement-if/migrated_0002/expected.json b/test/fixtures/esprima/statement-if/migrated_0002/expected.json index c1930814e6..086e802703 100644 --- a/test/fixtures/esprima/statement-if/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-if/migrated_0002/expected.json @@ -104,7 +104,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 21, "end": 22, "loc": { diff --git a/test/fixtures/esprima/statement-if/migrated_0005/expected.json b/test/fixtures/esprima/statement-if/migrated_0005/expected.json index bede5565cc..07468bf95b 100644 --- a/test/fixtures/esprima/statement-if/migrated_0005/expected.json +++ b/test/fixtures/esprima/statement-if/migrated_0005/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 4, "end": 8, "loc": { diff --git a/test/fixtures/esprima/statement-if/migrated_0006/expected.json b/test/fixtures/esprima/statement-if/migrated_0006/expected.json index 79b23952bd..828179ffc2 100644 --- a/test/fixtures/esprima/statement-if/migrated_0006/expected.json +++ b/test/fixtures/esprima/statement-if/migrated_0006/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 4, "end": 8, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json index a065c54055..298c6ed2b8 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json @@ -90,7 +90,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 18, "end": 22, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json index bcc441a257..cf9db0e4fd 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json @@ -90,7 +90,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 18, "end": 22, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json index 09c2e86050..3bd687b08d 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json @@ -187,7 +187,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 28, "end": 30, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json index 7a2fd03273..7666f67d1b 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json @@ -74,7 +74,7 @@ "body": [] }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 16, "end": 21, "loc": { @@ -107,7 +107,7 @@ } }, "expression": { - "type": "Literal", + "type": "BooleanLiteral", "start": 23, "end": 28, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json index a3c55814f4..033f8a99dd 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json @@ -90,7 +90,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 17, "end": 21, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json index 1ee7296f46..ff791459e4 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json @@ -90,7 +90,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 18, "end": 22, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json index e3ddda1e17..b68c4e6106 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json index bf0cf79afd..c7381370ab 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json @@ -74,7 +74,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json index 0221127370..f45ca7088d 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json index 46c4e44c8f..6640f73295 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json @@ -88,7 +88,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json index 5f7188a434..e10d00d731 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json @@ -88,7 +88,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json index 20b89977b6..61391fdd9f 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json @@ -88,7 +88,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { @@ -137,7 +137,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 19, "end": 20, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json index 66dff360f5..fb76721dce 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { @@ -124,7 +124,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json index 1943c72a2e..f826f885de 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { @@ -124,7 +124,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json index ea41666efe..16f684a226 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { @@ -124,7 +124,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json index eac72f5d2b..f06c613c23 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json @@ -138,7 +138,7 @@ ] }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 16, "loc": { diff --git a/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json b/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json index cddf16fc26..c4f9e0e386 100644 --- a/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 14, "end": 18, "loc": { diff --git a/test/fixtures/esprima/statement-switch/migrated_0001/expected.json b/test/fixtures/esprima/statement-switch/migrated_0001/expected.json index 62e79f338e..9758d61707 100644 --- a/test/fixtures/esprima/statement-switch/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-switch/migrated_0001/expected.json @@ -139,7 +139,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { diff --git a/test/fixtures/esprima/statement-switch/migrated_0002/expected.json b/test/fixtures/esprima/statement-switch/migrated_0002/expected.json index b29ad0f66d..7400509d5f 100644 --- a/test/fixtures/esprima/statement-switch/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-switch/migrated_0002/expected.json @@ -139,7 +139,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { diff --git a/test/fixtures/esprima/statement-throw/migrated_0002/expected.json b/test/fixtures/esprima/statement-throw/migrated_0002/expected.json index fe437eefa7..dc9afaed76 100644 --- a/test/fixtures/esprima/statement-throw/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-throw/migrated_0002/expected.json @@ -91,7 +91,7 @@ "name": "message" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 24, "loc": { diff --git a/test/fixtures/esprima/statement-variable/migrated_0002/expected.json b/test/fixtures/esprima/statement-variable/migrated_0002/expected.json index a5b0f49382..746c634e18 100644 --- a/test/fixtures/esprima/statement-variable/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-variable/migrated_0002/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { diff --git a/test/fixtures/esprima/statement-variable/migrated_0003/expected.json b/test/fixtures/esprima/statement-variable/migrated_0003/expected.json index 6ed6cc90fa..e88bd0e0af 100644 --- a/test/fixtures/esprima/statement-variable/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-variable/migrated_0003/expected.json @@ -74,7 +74,7 @@ "name": "eval" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { @@ -123,7 +123,7 @@ "name": "arguments" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 27, "end": 29, "loc": { diff --git a/test/fixtures/esprima/statement-variable/migrated_0004/expected.json b/test/fixtures/esprima/statement-variable/migrated_0004/expected.json index 6b9e9e3f3a..f0f1cc157c 100644 --- a/test/fixtures/esprima/statement-variable/migrated_0004/expected.json +++ b/test/fixtures/esprima/statement-variable/migrated_0004/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { @@ -123,7 +123,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 17, "loc": { @@ -172,7 +172,7 @@ "name": "z" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 27, "loc": { diff --git a/test/fixtures/experimental/async-functions/pattern/expected.json b/test/fixtures/experimental/async-functions/pattern/expected.json index 6a7dde062f..1793ef0b6f 100644 --- a/test/fixtures/experimental/async-functions/pattern/expected.json +++ b/test/fixtures/experimental/async-functions/pattern/expected.json @@ -157,7 +157,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "StringLiteral", "start": 24, "end": 38, "loc": { diff --git a/test/fixtures/experimental/uncategorised/21/expected.json b/test/fixtures/experimental/uncategorised/21/expected.json index 21fcf81f56..99ba85f172 100644 --- a/test/fixtures/experimental/uncategorised/21/expected.json +++ b/test/fixtures/experimental/uncategorised/21/expected.json @@ -122,7 +122,7 @@ "name": "a" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 14, "loc": { diff --git a/test/fixtures/experimental/uncategorised/26/expected.json b/test/fixtures/experimental/uncategorised/26/expected.json index 04b1d89257..8ee2fcb4e1 100644 --- a/test/fixtures/experimental/uncategorised/26/expected.json +++ b/test/fixtures/experimental/uncategorised/26/expected.json @@ -121,7 +121,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 12, "loc": { @@ -139,7 +139,7 @@ "raw": "1" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 15, "loc": { @@ -178,6 +178,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/experimental/uncategorised/28/expected.json b/test/fixtures/experimental/uncategorised/28/expected.json index 2ac6e0d7d9..882187725b 100644 --- a/test/fixtures/experimental/uncategorised/28/expected.json +++ b/test/fixtures/experimental/uncategorised/28/expected.json @@ -172,7 +172,7 @@ "name": "async" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 33, "end": 35, "loc": { @@ -197,6 +197,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/experimental/uncategorised/3/expected.json b/test/fixtures/experimental/uncategorised/3/expected.json index b3b034a0f3..b292c27d73 100644 --- a/test/fixtures/experimental/uncategorised/3/expected.json +++ b/test/fixtures/experimental/uncategorised/3/expected.json @@ -74,7 +74,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { diff --git a/test/fixtures/experimental/uncategorised/30/expected.json b/test/fixtures/experimental/uncategorised/30/expected.json index b632f91acc..3f7882d5fb 100644 --- a/test/fixtures/experimental/uncategorised/30/expected.json +++ b/test/fixtures/experimental/uncategorised/30/expected.json @@ -121,7 +121,7 @@ "name": "async" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 19, "end": 25, "loc": { diff --git a/test/fixtures/experimental/uncategorised/39/expected.json b/test/fixtures/experimental/uncategorised/39/expected.json index ae7ad96b18..10b9a29f22 100644 --- a/test/fixtures/experimental/uncategorised/39/expected.json +++ b/test/fixtures/experimental/uncategorised/39/expected.json @@ -170,7 +170,7 @@ "name": "foo" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 22, "loc": { diff --git a/test/fixtures/experimental/uncategorised/4/expected.json b/test/fixtures/experimental/uncategorised/4/expected.json index b80d1e3d1d..3487223172 100644 --- a/test/fixtures/experimental/uncategorised/4/expected.json +++ b/test/fixtures/experimental/uncategorised/4/expected.json @@ -88,7 +88,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 15, "loc": { @@ -107,7 +107,7 @@ }, "operator": "**", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 19, "end": 20, "loc": { diff --git a/test/fixtures/experimental/uncategorised/43/expected.json b/test/fixtures/experimental/uncategorised/43/expected.json index b60ecb31ce..fdf472db55 100644 --- a/test/fixtures/experimental/uncategorised/43/expected.json +++ b/test/fixtures/experimental/uncategorised/43/expected.json @@ -107,7 +107,7 @@ }, "static": false, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 18, "end": 23, "loc": { diff --git a/test/fixtures/experimental/uncategorised/46/expected.json b/test/fixtures/experimental/uncategorised/46/expected.json index c04b1ed63a..9035cd541b 100644 --- a/test/fixtures/experimental/uncategorised/46/expected.json +++ b/test/fixtures/experimental/uncategorised/46/expected.json @@ -107,7 +107,7 @@ }, "static": true, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 25, "end": 30, "loc": { diff --git a/test/fixtures/experimental/uncategorised/47/expected.json b/test/fixtures/experimental/uncategorised/47/expected.json index bda9a3aa5f..529bbb3a16 100644 --- a/test/fixtures/experimental/uncategorised/47/expected.json +++ b/test/fixtures/experimental/uncategorised/47/expected.json @@ -140,7 +140,7 @@ }, "static": false, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 23, "end": 28, "loc": { diff --git a/test/fixtures/experimental/uncategorised/48/expected.json b/test/fixtures/experimental/uncategorised/48/expected.json index 4a67cce782..0a295b8d9b 100644 --- a/test/fixtures/experimental/uncategorised/48/expected.json +++ b/test/fixtures/experimental/uncategorised/48/expected.json @@ -140,7 +140,7 @@ }, "static": true, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 30, "end": 35, "loc": { diff --git a/test/fixtures/experimental/uncategorised/49/expected.json b/test/fixtures/experimental/uncategorised/49/expected.json index dfcd786eed..1017436d55 100644 --- a/test/fixtures/experimental/uncategorised/49/expected.json +++ b/test/fixtures/experimental/uncategorised/49/expected.json @@ -155,7 +155,7 @@ "name": "bar" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 22, "end": 27, "loc": { diff --git a/test/fixtures/experimental/uncategorised/5/expected.json b/test/fixtures/experimental/uncategorised/5/expected.json index 645aef02a4..8a1368ec93 100644 --- a/test/fixtures/experimental/uncategorised/5/expected.json +++ b/test/fixtures/experimental/uncategorised/5/expected.json @@ -57,7 +57,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 1, "loc": { @@ -90,7 +90,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { @@ -109,7 +109,7 @@ }, "operator": "**", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 12, "loc": { diff --git a/test/fixtures/experimental/uncategorised/50/expected.json b/test/fixtures/experimental/uncategorised/50/expected.json index 1ee24c7d22..982de0b582 100644 --- a/test/fixtures/experimental/uncategorised/50/expected.json +++ b/test/fixtures/experimental/uncategorised/50/expected.json @@ -123,7 +123,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 25, "end": 30, "loc": { diff --git a/test/fixtures/experimental/uncategorised/51/expected.json b/test/fixtures/experimental/uncategorised/51/expected.json index fce4a529c1..6c2099d8f6 100644 --- a/test/fixtures/experimental/uncategorised/51/expected.json +++ b/test/fixtures/experimental/uncategorised/51/expected.json @@ -123,7 +123,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 30, "end": 35, "loc": { diff --git a/test/fixtures/experimental/uncategorised/52/expected.json b/test/fixtures/experimental/uncategorised/52/expected.json index ce4be697a2..c0646aafb4 100644 --- a/test/fixtures/experimental/uncategorised/52/expected.json +++ b/test/fixtures/experimental/uncategorised/52/expected.json @@ -76,7 +76,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 16, "end": 21, "loc": { diff --git a/test/fixtures/experimental/uncategorised/53/expected.json b/test/fixtures/experimental/uncategorised/53/expected.json index 2808aa7406..1b94aadbe9 100644 --- a/test/fixtures/experimental/uncategorised/53/expected.json +++ b/test/fixtures/experimental/uncategorised/53/expected.json @@ -76,7 +76,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 20, "end": 25, "loc": { diff --git a/test/fixtures/experimental/uncategorised/54/expected.json b/test/fixtures/experimental/uncategorised/54/expected.json index a8787da9bf..e7128ee647 100644 --- a/test/fixtures/experimental/uncategorised/54/expected.json +++ b/test/fixtures/experimental/uncategorised/54/expected.json @@ -76,7 +76,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 21, "end": 26, "loc": { diff --git a/test/fixtures/experimental/uncategorised/55/expected.json b/test/fixtures/experimental/uncategorised/55/expected.json index 7f7e0e35a4..4935b2fec0 100644 --- a/test/fixtures/experimental/uncategorised/55/expected.json +++ b/test/fixtures/experimental/uncategorised/55/expected.json @@ -90,7 +90,7 @@ "name": "n" }, { - "type": "Literal", + "type": "StringLiteral", "start": 7, "end": 10, "loc": { @@ -108,7 +108,7 @@ "raw": "'='" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/experimental/uncategorised/58/expected.json b/test/fixtures/experimental/uncategorised/58/expected.json index 81f0200f6c..9cf1dfe1ed 100644 --- a/test/fixtures/experimental/uncategorised/58/expected.json +++ b/test/fixtures/experimental/uncategorised/58/expected.json @@ -94,7 +94,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/experimental/uncategorised/6/expected.json b/test/fixtures/experimental/uncategorised/6/expected.json index 15ed38285c..c0f4e3fb97 100644 --- a/test/fixtures/experimental/uncategorised/6/expected.json +++ b/test/fixtures/experimental/uncategorised/6/expected.json @@ -57,7 +57,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 1, "loc": { @@ -90,7 +90,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 6, "loc": { @@ -109,7 +109,7 @@ }, "operator": "**", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { diff --git a/test/fixtures/experimental/uncategorised/62/expected.json b/test/fixtures/experimental/uncategorised/62/expected.json index 5b29d24e51..8b52f4f5bb 100644 --- a/test/fixtures/experimental/uncategorised/62/expected.json +++ b/test/fixtures/experimental/uncategorised/62/expected.json @@ -124,7 +124,7 @@ } ], "body": { - "type": "Literal", + "type": "NullLiteral", "start": 19, "end": 23, "loc": { @@ -136,10 +136,7 @@ "line": 1, "column": 23 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } } } ] @@ -182,4 +179,4 @@ } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/experimental/uncategorised/7/expected.json b/test/fixtures/experimental/uncategorised/7/expected.json index 2bf4b6353d..a2a7cb100c 100644 --- a/test/fixtures/experimental/uncategorised/7/expected.json +++ b/test/fixtures/experimental/uncategorised/7/expected.json @@ -71,7 +71,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 1, "end": 2, "loc": { @@ -106,7 +106,7 @@ "operator": "-", "prefix": true, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 8, "loc": { @@ -128,7 +128,7 @@ }, "operator": "*", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/experimental/uncategorised/8/expected.json b/test/fixtures/experimental/uncategorised/8/expected.json index f9cf647bff..adb1668c02 100644 --- a/test/fixtures/experimental/uncategorised/8/expected.json +++ b/test/fixtures/experimental/uncategorised/8/expected.json @@ -71,7 +71,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 1, "loc": { @@ -106,7 +106,7 @@ "operator": "-", "prefix": true, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { @@ -127,7 +127,7 @@ }, "operator": "*", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { diff --git a/test/fixtures/flow/declare-module/2/expected.json b/test/fixtures/flow/declare-module/2/expected.json index 71ef4876cd..4b8d16c85b 100644 --- a/test/fixtures/flow/declare-module/2/expected.json +++ b/test/fixtures/flow/declare-module/2/expected.json @@ -43,7 +43,7 @@ } }, "id": { - "type": "Literal", + "type": "StringLiteral", "start": 15, "end": 25, "loc": { @@ -78,6 +78,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/regression/issue-2083/expected.json b/test/fixtures/flow/regression/issue-2083/expected.json index 41723449a1..b6f6514238 100644 --- a/test/fixtures/flow/regression/issue-2083/expected.json +++ b/test/fixtures/flow/regression/issue-2083/expected.json @@ -156,7 +156,7 @@ } }, "discriminant": { - "type": "Literal", + "type": "NumberLiteral", "start": 34, "end": 35, "loc": { @@ -436,7 +436,7 @@ }, "operator": "<<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 144, "end": 145, "loc": { diff --git a/test/fixtures/flow/tuples/3/expected.json b/test/fixtures/flow/tuples/3/expected.json index 986bbd31ac..21c02d7040 100644 --- a/test/fixtures/flow/tuples/3/expected.json +++ b/test/fixtures/flow/tuples/3/expected.json @@ -136,7 +136,7 @@ }, "elements": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 21, "end": 24, "loc": { @@ -160,6 +160,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/tuples/4/expected.json b/test/fixtures/flow/tuples/4/expected.json index f78dc3b679..17eb3accf4 100644 --- a/test/fixtures/flow/tuples/4/expected.json +++ b/test/fixtures/flow/tuples/4/expected.json @@ -151,7 +151,7 @@ }, "elements": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 28, "end": 31, "loc": { @@ -169,7 +169,7 @@ "raw": "123" }, { - "type": "Literal", + "type": "StringLiteral", "start": 33, "end": 39, "loc": { @@ -193,6 +193,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/26/expected.json b/test/fixtures/flow/type-annotations/26/expected.json index 6e91455db9..1b09f8300e 100644 --- a/test/fixtures/flow/type-annotations/26/expected.json +++ b/test/fixtures/flow/type-annotations/26/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "NumberLiteral", "start": 3, "end": 6, "loc": { @@ -310,6 +310,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/44/expected.json b/test/fixtures/flow/type-annotations/44/expected.json index 98db1ba294..a13ad52d6e 100644 --- a/test/fixtures/flow/type-annotations/44/expected.json +++ b/test/fixtures/flow/type-annotations/44/expected.json @@ -167,7 +167,7 @@ }, "elements": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 24, "loc": { @@ -185,7 +185,7 @@ "raw": "1" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 26, "end": 27, "loc": { @@ -203,7 +203,7 @@ "raw": "2" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 29, "end": 30, "loc": { @@ -227,6 +227,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/50/expected.json b/test/fixtures/flow/type-annotations/50/expected.json index a30fc23bd0..d251f51520 100644 --- a/test/fixtures/flow/type-annotations/50/expected.json +++ b/test/fixtures/flow/type-annotations/50/expected.json @@ -219,7 +219,7 @@ } }, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 40, "end": 42, "loc": { @@ -278,6 +278,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/51/expected.json b/test/fixtures/flow/type-annotations/51/expected.json index efaa54f891..1168baaca8 100644 --- a/test/fixtures/flow/type-annotations/51/expected.json +++ b/test/fixtures/flow/type-annotations/51/expected.json @@ -90,7 +90,7 @@ }, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 12, "end": 17, "loc": { @@ -183,6 +183,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/55/expected.json b/test/fixtures/flow/type-annotations/55/expected.json index ba55a107da..7b5fe45e43 100644 --- a/test/fixtures/flow/type-annotations/55/expected.json +++ b/test/fixtures/flow/type-annotations/55/expected.json @@ -136,7 +136,7 @@ } }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 26, "end": 27, "loc": { @@ -158,6 +158,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/60/expected.json b/test/fixtures/flow/type-annotations/60/expected.json index 4a4f09bb41..e74d96fd69 100644 --- a/test/fixtures/flow/type-annotations/60/expected.json +++ b/test/fixtures/flow/type-annotations/60/expected.json @@ -255,7 +255,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 30, "end": 37, "loc": { @@ -281,6 +281,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/61/expected.json b/test/fixtures/flow/type-annotations/61/expected.json index da30aa7d42..e0d9d00c06 100644 --- a/test/fixtures/flow/type-annotations/61/expected.json +++ b/test/fixtures/flow/type-annotations/61/expected.json @@ -255,7 +255,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 29, "end": 36, "loc": { @@ -281,6 +281,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/62/expected.json b/test/fixtures/flow/type-annotations/62/expected.json index bb2b505c32..505317d656 100644 --- a/test/fixtures/flow/type-annotations/62/expected.json +++ b/test/fixtures/flow/type-annotations/62/expected.json @@ -184,7 +184,7 @@ }, "elements": [ { - "type": "Literal", + "type": "StringLiteral", "start": 27, "end": 34, "loc": { @@ -208,6 +208,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/89/expected.json b/test/fixtures/flow/type-annotations/89/expected.json index 6e9f5fb118..6a74fc876f 100644 --- a/test/fixtures/flow/type-annotations/89/expected.json +++ b/test/fixtures/flow/type-annotations/89/expected.json @@ -77,7 +77,7 @@ ], "importKind": "type", "source": { - "type": "Literal", + "type": "StringLiteral", "start": 21, "end": 26, "loc": { @@ -96,6 +96,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/90/expected.json b/test/fixtures/flow/type-annotations/90/expected.json index 6a3d90e3fc..645f92bcbf 100644 --- a/test/fixtures/flow/type-annotations/90/expected.json +++ b/test/fixtures/flow/type-annotations/90/expected.json @@ -77,7 +77,7 @@ ], "importKind": "typeof", "source": { - "type": "Literal", + "type": "StringLiteral", "start": 23, "end": 28, "loc": { @@ -96,6 +96,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/91/expected.json b/test/fixtures/flow/type-annotations/91/expected.json index c89dc1f3e2..58a81038df 100644 --- a/test/fixtures/flow/type-annotations/91/expected.json +++ b/test/fixtures/flow/type-annotations/91/expected.json @@ -140,7 +140,7 @@ ], "importKind": "type", "source": { - "type": "Literal", + "type": "StringLiteral", "start": 28, "end": 33, "loc": { @@ -159,6 +159,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/92/expected.json b/test/fixtures/flow/type-annotations/92/expected.json index bc7f70f9d0..3877416eba 100644 --- a/test/fixtures/flow/type-annotations/92/expected.json +++ b/test/fixtures/flow/type-annotations/92/expected.json @@ -93,7 +93,7 @@ ], "importKind": "typeof", "source": { - "type": "Literal", + "type": "StringLiteral", "start": 32, "end": 37, "loc": { @@ -112,6 +112,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/93/expected.json b/test/fixtures/flow/type-annotations/93/expected.json index ea96875cff..11fcfc35ba 100644 --- a/test/fixtures/flow/type-annotations/93/expected.json +++ b/test/fixtures/flow/type-annotations/93/expected.json @@ -77,7 +77,7 @@ ], "importKind": "value", "source": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 22, "loc": { @@ -96,6 +96,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/94/expected.json b/test/fixtures/flow/type-annotations/94/expected.json index 68d7ec00e2..f12baf85de 100644 --- a/test/fixtures/flow/type-annotations/94/expected.json +++ b/test/fixtures/flow/type-annotations/94/expected.json @@ -124,7 +124,7 @@ ], "importKind": "value", "source": { - "type": "Literal", + "type": "StringLiteral", "start": 24, "end": 29, "loc": { @@ -143,6 +143,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/95/expected.json b/test/fixtures/flow/type-annotations/95/expected.json index ded0af06a1..770d5376af 100644 --- a/test/fixtures/flow/type-annotations/95/expected.json +++ b/test/fixtures/flow/type-annotations/95/expected.json @@ -77,7 +77,7 @@ ], "importKind": "type", "source": { - "type": "Literal", + "type": "StringLiteral", "start": 32, "end": 37, "loc": { @@ -96,6 +96,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-annotations/96/expected.json b/test/fixtures/flow/type-annotations/96/expected.json index c1262eb5ba..4570cc24e3 100644 --- a/test/fixtures/flow/type-annotations/96/expected.json +++ b/test/fixtures/flow/type-annotations/96/expected.json @@ -77,7 +77,7 @@ ], "importKind": "typeof", "source": { - "type": "Literal", + "type": "StringLiteral", "start": 34, "end": 39, "loc": { @@ -96,6 +96,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/type-exports/specifier-from/expected.json b/test/fixtures/flow/type-exports/specifier-from/expected.json index b0ed4559fe..a02b5f1134 100644 --- a/test/fixtures/flow/type-exports/specifier-from/expected.json +++ b/test/fixtures/flow/type-exports/specifier-from/expected.json @@ -42,7 +42,6 @@ "column": 34 } }, - "exportKind": "type", "specifiers": [ { "type": "ExportSpecifier", @@ -93,7 +92,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 25, "end": 33, "loc": { @@ -110,6 +109,7 @@ "rawValue": "foobar", "raw": "\"foobar\"" }, + "exportKind": "type", "declaration": null } ] diff --git a/test/fixtures/flow/typecasts/2/expected.json b/test/fixtures/flow/typecasts/2/expected.json index b703a717b9..d336563032 100644 --- a/test/fixtures/flow/typecasts/2/expected.json +++ b/test/fixtures/flow/typecasts/2/expected.json @@ -105,7 +105,7 @@ "name": "xxx" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 8, "loc": { @@ -158,7 +158,7 @@ "name": "yyy" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 15, "end": 20, "loc": { @@ -311,6 +311,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/typecasts/3/expected.json b/test/fixtures/flow/typecasts/3/expected.json index 6a5173baa1..b11b08e49e 100644 --- a/test/fixtures/flow/typecasts/3/expected.json +++ b/test/fixtures/flow/typecasts/3/expected.json @@ -124,7 +124,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 17, "loc": { @@ -243,6 +243,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/computed-properties/call-expression/expected.json b/test/fixtures/harmony/computed-properties/call-expression/expected.json index df5fedc3b7..ffcd91d394 100644 --- a/test/fixtures/harmony/computed-properties/call-expression/expected.json +++ b/test/fixtures/harmony/computed-properties/call-expression/expected.json @@ -138,7 +138,7 @@ "arguments": [] }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 23, "end": 25, "loc": { @@ -164,6 +164,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/1/expected.json b/test/fixtures/harmony/uncategorised/1/expected.json index a9ae440c03..6a4ff90185 100644 --- a/test/fixtures/harmony/uncategorised/1/expected.json +++ b/test/fixtures/harmony/uncategorised/1/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 18, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/10/expected.json b/test/fixtures/harmony/uncategorised/10/expected.json index cf7579fc2b..263b4b83d5 100644 --- a/test/fixtures/harmony/uncategorised/10/expected.json +++ b/test/fixtures/harmony/uncategorised/10/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/106/expected.json b/test/fixtures/harmony/uncategorised/106/expected.json index 2bbbe1257e..2e0186e88f 100644 --- a/test/fixtures/harmony/uncategorised/106/expected.json +++ b/test/fixtures/harmony/uncategorised/106/expected.json @@ -120,7 +120,7 @@ }, "delegate": false, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 28, "end": 30, "loc": { @@ -146,6 +146,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/11/expected.json b/test/fixtures/harmony/uncategorised/11/expected.json index a6833d9df8..372c9fce63 100644 --- a/test/fixtures/harmony/uncategorised/11/expected.json +++ b/test/fixtures/harmony/uncategorised/11/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/12/expected.json b/test/fixtures/harmony/uncategorised/12/expected.json index eaf92df189..607cd3e194 100644 --- a/test/fixtures/harmony/uncategorised/12/expected.json +++ b/test/fixtures/harmony/uncategorised/12/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/123/expected.json b/test/fixtures/harmony/uncategorised/123/expected.json index 4cf591f784..76c74308aa 100644 --- a/test/fixtures/harmony/uncategorised/123/expected.json +++ b/test/fixtures/harmony/uncategorised/123/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 12, "loc": { @@ -243,6 +243,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/124/expected.json b/test/fixtures/harmony/uncategorised/124/expected.json index 7a76a503ec..964171a1ab 100644 --- a/test/fixtures/harmony/uncategorised/124/expected.json +++ b/test/fixtures/harmony/uncategorised/124/expected.json @@ -90,7 +90,7 @@ }, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 9, "end": 22, "loc": { diff --git a/test/fixtures/harmony/uncategorised/13/expected.json b/test/fixtures/harmony/uncategorised/13/expected.json index 2f625b7911..23356e76be 100644 --- a/test/fixtures/harmony/uncategorised/13/expected.json +++ b/test/fixtures/harmony/uncategorised/13/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/130/expected.json b/test/fixtures/harmony/uncategorised/130/expected.json index c0bdfdc191..6f0fe5e565 100644 --- a/test/fixtures/harmony/uncategorised/130/expected.json +++ b/test/fixtures/harmony/uncategorised/130/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 12, "loc": { @@ -243,6 +243,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/14/expected.json b/test/fixtures/harmony/uncategorised/14/expected.json index 49de700092..be3c47afa8 100644 --- a/test/fixtures/harmony/uncategorised/14/expected.json +++ b/test/fixtures/harmony/uncategorised/14/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/141/expected.json b/test/fixtures/harmony/uncategorised/141/expected.json index 3ab0349417..d47fdad79c 100644 --- a/test/fixtures/harmony/uncategorised/141/expected.json +++ b/test/fixtures/harmony/uncategorised/141/expected.json @@ -91,7 +91,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { @@ -115,6 +115,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/142/expected.json b/test/fixtures/harmony/uncategorised/142/expected.json index 970e72e609..259c9600a4 100644 --- a/test/fixtures/harmony/uncategorised/142/expected.json +++ b/test/fixtures/harmony/uncategorised/142/expected.json @@ -89,7 +89,7 @@ } }, "left": { - "type": "Literal", + "type": "StringLiteral", "start": 3, "end": 6, "loc": { @@ -108,7 +108,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "StringLiteral", "start": 9, "end": 12, "loc": { @@ -127,7 +127,7 @@ } }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { @@ -151,6 +151,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/144/expected.json b/test/fixtures/harmony/uncategorised/144/expected.json index 682d65ed9c..2e3bc139b5 100644 --- a/test/fixtures/harmony/uncategorised/144/expected.json +++ b/test/fixtures/harmony/uncategorised/144/expected.json @@ -91,7 +91,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { @@ -144,7 +144,7 @@ "name": "y" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 16, "loc": { @@ -168,6 +168,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/15/expected.json b/test/fixtures/harmony/uncategorised/15/expected.json index 611801c26d..ae57cab25c 100644 --- a/test/fixtures/harmony/uncategorised/15/expected.json +++ b/test/fixtures/harmony/uncategorised/15/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/152/expected.json b/test/fixtures/harmony/uncategorised/152/expected.json index 045e5e565d..f48012f5a7 100644 --- a/test/fixtures/harmony/uncategorised/152/expected.json +++ b/test/fixtures/harmony/uncategorised/152/expected.json @@ -124,7 +124,7 @@ }, "elements": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { @@ -163,6 +163,5 @@ } } ] - }, - "comments": [] -} + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/153/expected.json b/test/fixtures/harmony/uncategorised/153/expected.json index 2fbb48c993..c58bffb9c1 100644 --- a/test/fixtures/harmony/uncategorised/153/expected.json +++ b/test/fixtures/harmony/uncategorised/153/expected.json @@ -192,7 +192,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 21, "end": 23, "loc": { @@ -233,6 +233,5 @@ } } ] - }, - "comments": [] -} + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/154/expected.json b/test/fixtures/harmony/uncategorised/154/expected.json index 5c0d184dea..da3399ea06 100644 --- a/test/fixtures/harmony/uncategorised/154/expected.json +++ b/test/fixtures/harmony/uncategorised/154/expected.json @@ -222,7 +222,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { @@ -265,6 +265,5 @@ } } ] - }, - "comments": [] -} + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/155/expected.json b/test/fixtures/harmony/uncategorised/155/expected.json index 446945cf11..e1d8689d55 100644 --- a/test/fixtures/harmony/uncategorised/155/expected.json +++ b/test/fixtures/harmony/uncategorised/155/expected.json @@ -239,7 +239,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 24, "end": 26, "loc": { @@ -286,6 +286,5 @@ } } ] - }, - "comments": [] -} + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/156/expected.json b/test/fixtures/harmony/uncategorised/156/expected.json index f1b3b84818..02567ac39f 100644 --- a/test/fixtures/harmony/uncategorised/156/expected.json +++ b/test/fixtures/harmony/uncategorised/156/expected.json @@ -240,7 +240,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 16, "loc": { @@ -286,6 +286,5 @@ } } ] - }, - "comments": [] -} + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/157/expected.json b/test/fixtures/harmony/uncategorised/157/expected.json index 8f9e16207b..2995b318d4 100644 --- a/test/fixtures/harmony/uncategorised/157/expected.json +++ b/test/fixtures/harmony/uncategorised/157/expected.json @@ -255,7 +255,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 20, "end": 22, "loc": { @@ -302,6 +302,5 @@ } } ] - }, - "comments": [] -} + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/158/expected.json b/test/fixtures/harmony/uncategorised/158/expected.json index eef638df4a..a58c38c687 100644 --- a/test/fixtures/harmony/uncategorised/158/expected.json +++ b/test/fixtures/harmony/uncategorised/158/expected.json @@ -191,7 +191,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { @@ -234,6 +234,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/159/expected.json b/test/fixtures/harmony/uncategorised/159/expected.json index 1f57c33a36..8f7d2304f4 100644 --- a/test/fixtures/harmony/uncategorised/159/expected.json +++ b/test/fixtures/harmony/uncategorised/159/expected.json @@ -122,7 +122,7 @@ "name": "y" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 17, "end": 18, "loc": { @@ -161,6 +161,5 @@ } } ] - }, - "comments": [] -} + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/16/expected.json b/test/fixtures/harmony/uncategorised/16/expected.json index 112c7f0752..4937dfc854 100644 --- a/test/fixtures/harmony/uncategorised/16/expected.json +++ b/test/fixtures/harmony/uncategorised/16/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/160/expected.json b/test/fixtures/harmony/uncategorised/160/expected.json index b9dcf3ed65..beb32095e0 100644 --- a/test/fixtures/harmony/uncategorised/160/expected.json +++ b/test/fixtures/harmony/uncategorised/160/expected.json @@ -92,7 +92,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 16, "loc": { @@ -129,6 +129,5 @@ } } ] - }, - "comments": [] -} + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/161/expected.json b/test/fixtures/harmony/uncategorised/161/expected.json index 50711e7b4a..133d3320bc 100644 --- a/test/fixtures/harmony/uncategorised/161/expected.json +++ b/test/fixtures/harmony/uncategorised/161/expected.json @@ -170,7 +170,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 20, "end": 21, "loc": { @@ -213,6 +213,5 @@ } } ] - }, - "comments": [] -} + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/162/expected.json b/test/fixtures/harmony/uncategorised/162/expected.json index 5ba4e49328..36f0dea590 100644 --- a/test/fixtures/harmony/uncategorised/162/expected.json +++ b/test/fixtures/harmony/uncategorised/162/expected.json @@ -171,7 +171,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { @@ -213,6 +213,5 @@ } } ] - }, - "comments": [] -} + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/17/expected.json b/test/fixtures/harmony/uncategorised/17/expected.json index 5c09cfb02a..e6cfe9f05a 100644 --- a/test/fixtures/harmony/uncategorised/17/expected.json +++ b/test/fixtures/harmony/uncategorised/17/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/195/expected.json b/test/fixtures/harmony/uncategorised/195/expected.json index 2ca03c6467..0f0150fd2b 100644 --- a/test/fixtures/harmony/uncategorised/195/expected.json +++ b/test/fixtures/harmony/uncategorised/195/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "RegexLiteral", "start": 0, "end": 8, "loc": { @@ -57,10 +57,8 @@ } }, "raw": "/[a-z]/u", - "regex": { - "pattern": "[a-z]", - "flags": "u" - } + "pattern": "[a-z]", + "flags": "u" } } ] diff --git a/test/fixtures/harmony/uncategorised/196/expected.json b/test/fixtures/harmony/uncategorised/196/expected.json index c8b5823f15..13ccb35613 100644 --- a/test/fixtures/harmony/uncategorised/196/expected.json +++ b/test/fixtures/harmony/uncategorised/196/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "RegexLiteral", "start": 0, "end": 33, "loc": { @@ -57,10 +57,8 @@ } }, "raw": "/[\\uD834\\uDF06-\\uD834\\uDF08a-z]/u", - "regex": { - "pattern": "[\\uD834\\uDF06-\\uD834\\uDF08a-z]", - "flags": "u" - } + "pattern": "[\\uD834\\uDF06-\\uD834\\uDF08a-z]", + "flags": "u" } } ] diff --git a/test/fixtures/harmony/uncategorised/197/expected.json b/test/fixtures/harmony/uncategorised/197/expected.json index 8b60d84c91..aa7ff354b4 100644 --- a/test/fixtures/harmony/uncategorised/197/expected.json +++ b/test/fixtures/harmony/uncategorised/197/expected.json @@ -59,7 +59,7 @@ "body": [] }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 13, "end": 18, "loc": { diff --git a/test/fixtures/harmony/uncategorised/2/expected.json b/test/fixtures/harmony/uncategorised/2/expected.json index fd4079e13c..5a854ab9f5 100644 --- a/test/fixtures/harmony/uncategorised/2/expected.json +++ b/test/fixtures/harmony/uncategorised/2/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 27, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/256/expected.json b/test/fixtures/harmony/uncategorised/256/expected.json index 836f9f66a5..3d0fad6ce6 100644 --- a/test/fixtures/harmony/uncategorised/256/expected.json +++ b/test/fixtures/harmony/uncategorised/256/expected.json @@ -74,7 +74,7 @@ }, "operator": "*", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { @@ -94,6 +94,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/257/expected.json b/test/fixtures/harmony/uncategorised/257/expected.json index 4c98e444eb..3aef2ac8d9 100644 --- a/test/fixtures/harmony/uncategorised/257/expected.json +++ b/test/fixtures/harmony/uncategorised/257/expected.json @@ -109,7 +109,7 @@ }, "operator": "*", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { @@ -130,6 +130,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/259/expected.json b/test/fixtures/harmony/uncategorised/259/expected.json index 0a6392a4fb..970d0563d8 100644 --- a/test/fixtures/harmony/uncategorised/259/expected.json +++ b/test/fixtures/harmony/uncategorised/259/expected.json @@ -121,7 +121,7 @@ }, "operator": "*", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 22, "end": 24, "loc": { @@ -146,6 +146,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/26/expected.json b/test/fixtures/harmony/uncategorised/26/expected.json index a3d1a0b6eb..08ba30f47d 100644 --- a/test/fixtures/harmony/uncategorised/26/expected.json +++ b/test/fixtures/harmony/uncategorised/26/expected.json @@ -154,7 +154,7 @@ "name": "y" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 18, "loc": { @@ -242,7 +242,7 @@ } }, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 53, "end": 54, "loc": { diff --git a/test/fixtures/harmony/uncategorised/27/expected.json b/test/fixtures/harmony/uncategorised/27/expected.json index e66752bc00..e61945111a 100644 --- a/test/fixtures/harmony/uncategorised/27/expected.json +++ b/test/fixtures/harmony/uncategorised/27/expected.json @@ -120,7 +120,7 @@ "name": "t" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 35, "end": 37, "loc": { @@ -159,7 +159,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { @@ -180,6 +180,5 @@ ] } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/28/expected.json b/test/fixtures/harmony/uncategorised/28/expected.json index e05229464f..ed4c1605fe 100644 --- a/test/fixtures/harmony/uncategorised/28/expected.json +++ b/test/fixtures/harmony/uncategorised/28/expected.json @@ -61,7 +61,7 @@ "expression": true, "params": [], "body": { - "type": "Literal", + "type": "StringLiteral", "start": 6, "end": 12, "loc": { @@ -81,6 +81,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/29/expected.json b/test/fixtures/harmony/uncategorised/29/expected.json index 59c25b25cd..c3e068731d 100644 --- a/test/fixtures/harmony/uncategorised/29/expected.json +++ b/test/fixtures/harmony/uncategorised/29/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "StringLiteral", "start": 5, "end": 11, "loc": { @@ -98,6 +98,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/3/expected.json b/test/fixtures/harmony/uncategorised/3/expected.json index f5ca6c6f39..1e3d179cd6 100644 --- a/test/fixtures/harmony/uncategorised/3/expected.json +++ b/test/fixtures/harmony/uncategorised/3/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 2, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/30/expected.json b/test/fixtures/harmony/uncategorised/30/expected.json index b0d9fc44f3..dc38971fa7 100644 --- a/test/fixtures/harmony/uncategorised/30/expected.json +++ b/test/fixtures/harmony/uncategorised/30/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "StringLiteral", "start": 7, "end": 13, "loc": { @@ -98,6 +98,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/300/expected.json b/test/fixtures/harmony/uncategorised/300/expected.json index c19f8b6668..89a1eb3ff5 100644 --- a/test/fixtures/harmony/uncategorised/300/expected.json +++ b/test/fixtures/harmony/uncategorised/300/expected.json @@ -108,7 +108,7 @@ "name": "y" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { @@ -146,4 +146,4 @@ } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/301/expected.json b/test/fixtures/harmony/uncategorised/301/expected.json index 748f7b6f7d..448e59b1ff 100644 --- a/test/fixtures/harmony/uncategorised/301/expected.json +++ b/test/fixtures/harmony/uncategorised/301/expected.json @@ -107,7 +107,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 26, "end": 31, "loc": { diff --git a/test/fixtures/harmony/uncategorised/307/expected.json b/test/fixtures/harmony/uncategorised/307/expected.json index 1fca349af8..293ea2a087 100644 --- a/test/fixtures/harmony/uncategorised/307/expected.json +++ b/test/fixtures/harmony/uncategorised/307/expected.json @@ -137,7 +137,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { @@ -178,6 +178,5 @@ } } ] - }, - "comments": [] -} + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/308/expected.json b/test/fixtures/harmony/uncategorised/308/expected.json index dcfb5844b9..2517a00a40 100644 --- a/test/fixtures/harmony/uncategorised/308/expected.json +++ b/test/fixtures/harmony/uncategorised/308/expected.json @@ -140,7 +140,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { @@ -181,6 +181,5 @@ } } ] - }, - "comments": [] -} + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/309/expected.json b/test/fixtures/harmony/uncategorised/309/expected.json index 274eb057e7..78a133f6c2 100644 --- a/test/fixtures/harmony/uncategorised/309/expected.json +++ b/test/fixtures/harmony/uncategorised/309/expected.json @@ -216,7 +216,7 @@ "name": "c" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 14, "loc": { @@ -262,6 +262,5 @@ } } ] - }, - "comments": [] -} + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/31/expected.json b/test/fixtures/harmony/uncategorised/31/expected.json index b53fa03e5e..4bdd74c258 100644 --- a/test/fixtures/harmony/uncategorised/31/expected.json +++ b/test/fixtures/harmony/uncategorised/31/expected.json @@ -94,7 +94,7 @@ } ], "body": { - "type": "Literal", + "type": "StringLiteral", "start": 10, "end": 16, "loc": { @@ -114,6 +114,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/310/expected.json b/test/fixtures/harmony/uncategorised/310/expected.json index 6b94dc1312..aba62152a7 100644 --- a/test/fixtures/harmony/uncategorised/310/expected.json +++ b/test/fixtures/harmony/uncategorised/310/expected.json @@ -122,7 +122,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { @@ -176,6 +176,5 @@ } } ] - }, - "comments": [] -} + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/317/expected.json b/test/fixtures/harmony/uncategorised/317/expected.json index a39ad7b107..49647b97c8 100644 --- a/test/fixtures/harmony/uncategorised/317/expected.json +++ b/test/fixtures/harmony/uncategorised/317/expected.json @@ -100,7 +100,7 @@ } }, "object": { - "type": "Literal", + "type": "RegexLiteral", "start": 3, "end": 7, "loc": { @@ -114,10 +114,8 @@ } }, "raw": "/\\d/", - "regex": { - "pattern": "\\d", - "flags": "" - } + "pattern": "\\d", + "flags": "" }, "property": { "type": "Identifier", @@ -139,7 +137,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 16, "loc": { @@ -159,7 +157,7 @@ ] }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { @@ -225,4 +223,4 @@ } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/318/expected.json b/test/fixtures/harmony/uncategorised/318/expected.json index 76c700c7ee..bb330b9204 100644 --- a/test/fixtures/harmony/uncategorised/318/expected.json +++ b/test/fixtures/harmony/uncategorised/318/expected.json @@ -74,7 +74,7 @@ "name": "_𐒦" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { diff --git a/test/fixtures/harmony/uncategorised/319/expected.json b/test/fixtures/harmony/uncategorised/319/expected.json index 15bd7d71f1..136c5bbf00 100644 --- a/test/fixtures/harmony/uncategorised/319/expected.json +++ b/test/fixtures/harmony/uncategorised/319/expected.json @@ -74,7 +74,7 @@ "name": "_𐒦" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 17, "end": 19, "loc": { diff --git a/test/fixtures/harmony/uncategorised/32/expected.json b/test/fixtures/harmony/uncategorised/32/expected.json index 5f23cad1a9..ebd04a794b 100644 --- a/test/fixtures/harmony/uncategorised/32/expected.json +++ b/test/fixtures/harmony/uncategorised/32/expected.json @@ -107,7 +107,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { @@ -130,6 +130,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/320/expected.json b/test/fixtures/harmony/uncategorised/320/expected.json index 45a5aee6ba..e03993bade 100644 --- a/test/fixtures/harmony/uncategorised/320/expected.json +++ b/test/fixtures/harmony/uncategorised/320/expected.json @@ -106,7 +106,7 @@ }, "elements": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/harmony/uncategorised/322/expected.json b/test/fixtures/harmony/uncategorised/322/expected.json index 6f01dc81ea..4accd0cb4a 100644 --- a/test/fixtures/harmony/uncategorised/322/expected.json +++ b/test/fixtures/harmony/uncategorised/322/expected.json @@ -92,7 +92,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { diff --git a/test/fixtures/harmony/uncategorised/33/expected.json b/test/fixtures/harmony/uncategorised/33/expected.json index 73ca4f7fdb..7a3afe8bd4 100644 --- a/test/fixtures/harmony/uncategorised/33/expected.json +++ b/test/fixtures/harmony/uncategorised/33/expected.json @@ -126,7 +126,7 @@ "name": "property" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 20, "loc": { @@ -151,6 +151,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/338/expected.json b/test/fixtures/harmony/uncategorised/338/expected.json index 4df49d304a..1f7043e170 100644 --- a/test/fixtures/harmony/uncategorised/338/expected.json +++ b/test/fixtures/harmony/uncategorised/338/expected.json @@ -108,7 +108,7 @@ } }, "expression": { - "type": "Literal", + "type": "BooleanLiteral", "start": 33, "end": 38, "loc": { diff --git a/test/fixtures/harmony/uncategorised/34/expected.json b/test/fixtures/harmony/uncategorised/34/expected.json index 959082456b..287f532194 100644 --- a/test/fixtures/harmony/uncategorised/34/expected.json +++ b/test/fixtures/harmony/uncategorised/34/expected.json @@ -121,7 +121,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 16, "loc": { @@ -161,6 +161,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/343/expected.json b/test/fixtures/harmony/uncategorised/343/expected.json new file mode 100644 index 0000000000..dd64dc845d --- /dev/null +++ b/test/fixtures/harmony/uncategorised/343/expected.json @@ -0,0 +1,68 @@ +{ + "type": "File", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "expression": { + "type": "Literal", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "raw": "/\\u{110000}/u", + "regex": { + "pattern": "\\u{110000}", + "flags": "u" + } + } + } + ] + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/349/expected.json b/test/fixtures/harmony/uncategorised/349/expected.json new file mode 100644 index 0000000000..0ea21db861 --- /dev/null +++ b/test/fixtures/harmony/uncategorised/349/expected.json @@ -0,0 +1,174 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 1, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "properties": [ + { + "type": "Property", + "start": 3, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "StringLiteral", + "start": 3, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": "__proto__", + "rawValue": "__proto__", + "raw": "'__proto__'" + }, + "value": { + "type": "NumberLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "kind": "init" + }, + { + "type": "Property", + "start": 19, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 19, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "name": "__proto__" + }, + "value": { + "type": "NumberLiteral", + "start": 30, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": 2, + "rawValue": 2, + "raw": "2" + }, + "kind": "init" + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/35/expected.json b/test/fixtures/harmony/uncategorised/35/expected.json index 484d42d231..9a918edee0 100644 --- a/test/fixtures/harmony/uncategorised/35/expected.json +++ b/test/fixtures/harmony/uncategorised/35/expected.json @@ -123,7 +123,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { @@ -146,6 +146,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/36/expected.json b/test/fixtures/harmony/uncategorised/36/expected.json index bde5188bf8..a1ba25b09e 100644 --- a/test/fixtures/harmony/uncategorised/36/expected.json +++ b/test/fixtures/harmony/uncategorised/36/expected.json @@ -112,7 +112,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 16, "loc": { @@ -132,6 +132,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/39/expected.json b/test/fixtures/harmony/uncategorised/39/expected.json index ad9e441cca..8b3e1161d1 100644 --- a/test/fixtures/harmony/uncategorised/39/expected.json +++ b/test/fixtures/harmony/uncategorised/39/expected.json @@ -91,7 +91,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 3, "end": 4, "loc": { @@ -161,6 +161,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/4/expected.json b/test/fixtures/harmony/uncategorised/4/expected.json index 6288501cd1..ccdde2fe5f 100644 --- a/test/fixtures/harmony/uncategorised/4/expected.json +++ b/test/fixtures/harmony/uncategorised/4/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/40/expected.json b/test/fixtures/harmony/uncategorised/40/expected.json index 61c99a2fcc..3351297bbe 100644 --- a/test/fixtures/harmony/uncategorised/40/expected.json +++ b/test/fixtures/harmony/uncategorised/40/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { @@ -98,6 +98,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/41/expected.json b/test/fixtures/harmony/uncategorised/41/expected.json index 94171780d3..cdb3afb5bc 100644 --- a/test/fixtures/harmony/uncategorised/41/expected.json +++ b/test/fixtures/harmony/uncategorised/41/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 15, "loc": { @@ -98,6 +98,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/42/expected.json b/test/fixtures/harmony/uncategorised/42/expected.json index 657dea1e69..c40f9bbb31 100644 --- a/test/fixtures/harmony/uncategorised/42/expected.json +++ b/test/fixtures/harmony/uncategorised/42/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { @@ -98,6 +98,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/43/expected.json b/test/fixtures/harmony/uncategorised/43/expected.json index a7af5109dd..95224d5129 100644 --- a/test/fixtures/harmony/uncategorised/43/expected.json +++ b/test/fixtures/harmony/uncategorised/43/expected.json @@ -94,7 +94,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 15, "loc": { @@ -114,6 +114,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/44/expected.json b/test/fixtures/harmony/uncategorised/44/expected.json index f887ecd168..645860e175 100644 --- a/test/fixtures/harmony/uncategorised/44/expected.json +++ b/test/fixtures/harmony/uncategorised/44/expected.json @@ -91,7 +91,7 @@ "name": "eval" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { @@ -111,7 +111,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { @@ -131,6 +131,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/45/expected.json b/test/fixtures/harmony/uncategorised/45/expected.json index f45d522944..fd39c13ced 100644 --- a/test/fixtures/harmony/uncategorised/45/expected.json +++ b/test/fixtures/harmony/uncategorised/45/expected.json @@ -107,7 +107,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { @@ -127,7 +127,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 20, "loc": { @@ -147,6 +147,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/47/expected.json b/test/fixtures/harmony/uncategorised/47/expected.json index 3b77c8e476..8368737c3f 100644 --- a/test/fixtures/harmony/uncategorised/47/expected.json +++ b/test/fixtures/harmony/uncategorised/47/expected.json @@ -113,7 +113,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { @@ -134,6 +134,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/5/expected.json b/test/fixtures/harmony/uncategorised/5/expected.json index e213587beb..b8fdcdd6b2 100644 --- a/test/fixtures/harmony/uncategorised/5/expected.json +++ b/test/fixtures/harmony/uncategorised/5/expected.json @@ -91,7 +91,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 29, "loc": { @@ -124,7 +124,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 31, "end": 34, "loc": { @@ -146,6 +146,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/54/expected.json b/test/fixtures/harmony/uncategorised/54/expected.json index 8d4c180d13..29fd63476c 100644 --- a/test/fixtures/harmony/uncategorised/54/expected.json +++ b/test/fixtures/harmony/uncategorised/54/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 6, "end": 14, "loc": { @@ -165,6 +165,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/6/expected.json b/test/fixtures/harmony/uncategorised/6/expected.json index 920e80aa74..58c5a75980 100644 --- a/test/fixtures/harmony/uncategorised/6/expected.json +++ b/test/fixtures/harmony/uncategorised/6/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/7/expected.json b/test/fixtures/harmony/uncategorised/7/expected.json index 32784e3d69..fc506965ec 100644 --- a/test/fixtures/harmony/uncategorised/7/expected.json +++ b/test/fixtures/harmony/uncategorised/7/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/79/expected.json b/test/fixtures/harmony/uncategorised/79/expected.json index 5fcf2bac2b..514934f092 100644 --- a/test/fixtures/harmony/uncategorised/79/expected.json +++ b/test/fixtures/harmony/uncategorised/79/expected.json @@ -43,7 +43,7 @@ } }, "declaration": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/8/expected.json b/test/fixtures/harmony/uncategorised/8/expected.json index 1f7b741877..0e4a704196 100644 --- a/test/fixtures/harmony/uncategorised/8/expected.json +++ b/test/fixtures/harmony/uncategorised/8/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/85/expected.json b/test/fixtures/harmony/uncategorised/85/expected.json index 0650eea051..70d15519cf 100644 --- a/test/fixtures/harmony/uncategorised/85/expected.json +++ b/test/fixtures/harmony/uncategorised/85/expected.json @@ -43,7 +43,7 @@ } }, "source": { - "type": "Literal", + "type": "StringLiteral", "start": 14, "end": 22, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/9/expected.json b/test/fixtures/harmony/uncategorised/9/expected.json index cfb1516d82..ed92c39059 100644 --- a/test/fixtures/harmony/uncategorised/9/expected.json +++ b/test/fixtures/harmony/uncategorised/9/expected.json @@ -91,7 +91,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 29, "loc": { @@ -124,7 +124,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 31, "end": 34, "loc": { @@ -146,6 +146,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/90/expected.json b/test/fixtures/harmony/uncategorised/90/expected.json index 49b363d4b6..ff8fd42d6a 100644 --- a/test/fixtures/harmony/uncategorised/90/expected.json +++ b/test/fixtures/harmony/uncategorised/90/expected.json @@ -93,7 +93,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 24, "end": 31, "loc": { @@ -112,6 +112,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/91/expected.json b/test/fixtures/harmony/uncategorised/91/expected.json index 2f38963800..6e11605ec5 100644 --- a/test/fixtures/harmony/uncategorised/91/expected.json +++ b/test/fixtures/harmony/uncategorised/91/expected.json @@ -44,7 +44,7 @@ }, "specifiers": [], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 7, "end": 15, "loc": { @@ -63,6 +63,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/92/expected.json b/test/fixtures/harmony/uncategorised/92/expected.json index 4682d05c0c..45b87643fb 100644 --- a/test/fixtures/harmony/uncategorised/92/expected.json +++ b/test/fixtures/harmony/uncategorised/92/expected.json @@ -76,7 +76,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 14, "end": 22, "loc": { @@ -95,6 +95,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/93/expected.json b/test/fixtures/harmony/uncategorised/93/expected.json index 082b8631eb..6c4333a59a 100644 --- a/test/fixtures/harmony/uncategorised/93/expected.json +++ b/test/fixtures/harmony/uncategorised/93/expected.json @@ -139,7 +139,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 33, "end": 41, "loc": { @@ -158,6 +158,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/94/expected.json b/test/fixtures/harmony/uncategorised/94/expected.json index 00a9ffa137..9df1956fbe 100644 --- a/test/fixtures/harmony/uncategorised/94/expected.json +++ b/test/fixtures/harmony/uncategorised/94/expected.json @@ -92,7 +92,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 31, "end": 39, "loc": { @@ -111,6 +111,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/95/expected.json b/test/fixtures/harmony/uncategorised/95/expected.json index 0d5c48622d..140aa920e3 100644 --- a/test/fixtures/harmony/uncategorised/95/expected.json +++ b/test/fixtures/harmony/uncategorised/95/expected.json @@ -170,7 +170,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 48, "end": 56, "loc": { @@ -189,6 +189,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/97/expected.json b/test/fixtures/harmony/uncategorised/97/expected.json index d5bc7664d0..166aaf0ed8 100644 --- a/test/fixtures/harmony/uncategorised/97/expected.json +++ b/test/fixtures/harmony/uncategorised/97/expected.json @@ -92,7 +92,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 28, "end": 33, "loc": { @@ -111,6 +111,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/98/expected.json b/test/fixtures/harmony/uncategorised/98/expected.json index 1687774468..3ab53b9b3e 100644 --- a/test/fixtures/harmony/uncategorised/98/expected.json +++ b/test/fixtures/harmony/uncategorised/98/expected.json @@ -76,7 +76,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 24, "end": 32, "loc": { @@ -95,6 +95,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/jsx/basic/11/expected.json b/test/fixtures/jsx/basic/11/expected.json index 032ce25604..0386be294e 100644 --- a/test/fixtures/jsx/basic/11/expected.json +++ b/test/fixtures/jsx/basic/11/expected.json @@ -122,7 +122,7 @@ }, "children": [ { - "type": "Literal", + "type": "JSXText", "start": 5, "end": 18, "loc": { diff --git a/test/fixtures/jsx/basic/12/expected.json b/test/fixtures/jsx/basic/12/expected.json index 1f3d2013ac..ebf4b56508 100644 --- a/test/fixtures/jsx/basic/12/expected.json +++ b/test/fixtures/jsx/basic/12/expected.json @@ -172,7 +172,7 @@ "children": [] }, { - "type": "Literal", + "type": "JSXText", "start": 11, "end": 35, "loc": { diff --git a/test/fixtures/jsx/basic/13/expected.json b/test/fixtures/jsx/basic/13/expected.json index 4d358e1604..6021b7c324 100644 --- a/test/fixtures/jsx/basic/13/expected.json +++ b/test/fixtures/jsx/basic/13/expected.json @@ -149,7 +149,8 @@ "selfClosing": true }, "closingElement": null, - "children": [] + "children": [], + "rawValue": null } }, { @@ -262,7 +263,7 @@ }, "children": [ { - "type": "Literal", + "type": "JSXText", "start": 31, "end": 50, "loc": { @@ -279,7 +280,8 @@ "rawValue": null, "raw": "monkeys /> gorillas" } - ] + ], + "rawValue": null } } ], diff --git a/test/fixtures/jsx/basic/18/expected.json b/test/fixtures/jsx/basic/18/expected.json index d1b336d98a..4e3544be8b 100644 --- a/test/fixtures/jsx/basic/18/expected.json +++ b/test/fixtures/jsx/basic/18/expected.json @@ -133,7 +133,7 @@ "name": "post" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 21, "end": 32, "loc": { diff --git a/test/fixtures/jsx/basic/19/expected.json b/test/fixtures/jsx/basic/19/expected.json index bce1bcea7f..ebafdd1cd7 100644 --- a/test/fixtures/jsx/basic/19/expected.json +++ b/test/fixtures/jsx/basic/19/expected.json @@ -102,7 +102,7 @@ "name": "pre" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 9, "end": 18, "loc": { @@ -151,7 +151,7 @@ "name": "pre2" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 24, "end": 35, "loc": { diff --git a/test/fixtures/jsx/basic/3/expected.json b/test/fixtures/jsx/basic/3/expected.json index 0f475db901..bbea012bdf 100644 --- a/test/fixtures/jsx/basic/3/expected.json +++ b/test/fixtures/jsx/basic/3/expected.json @@ -133,7 +133,7 @@ } }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 9, "end": 14, "loc": { @@ -203,7 +203,7 @@ }, "children": [ { - "type": "Literal", + "type": "JSXText", "start": 15, "end": 16, "loc": { @@ -252,7 +252,7 @@ } }, { - "type": "Literal", + "type": "JSXText", "start": 23, "end": 24, "loc": { diff --git a/test/fixtures/jsx/basic/4/expected.json b/test/fixtures/jsx/basic/4/expected.json index 7d7feea21e..f0367e5afa 100644 --- a/test/fixtures/jsx/basic/4/expected.json +++ b/test/fixtures/jsx/basic/4/expected.json @@ -116,7 +116,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 6, "end": 9, "loc": { @@ -166,7 +166,7 @@ "name": "c" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 16, "loc": { @@ -215,7 +215,7 @@ "name": "d" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 19, "end": 26, "loc": { @@ -264,7 +264,7 @@ "name": "e" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 29, "end": 37, "loc": { diff --git a/test/fixtures/jsx/basic/7/expected.json b/test/fixtures/jsx/basic/7/expected.json index 86927f63d6..6a87f0a92a 100644 --- a/test/fixtures/jsx/basic/7/expected.json +++ b/test/fixtures/jsx/basic/7/expected.json @@ -102,7 +102,7 @@ "name": "test" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 16, "end": 31, "loc": { @@ -172,7 +172,7 @@ }, "children": [ { - "type": "Literal", + "type": "JSXText", "start": 32, "end": 41, "loc": { diff --git a/test/fixtures/jsx/basic/keyword-tag/expected.json b/test/fixtures/jsx/basic/keyword-tag/expected.json new file mode 100644 index 0000000000..310e29dd35 --- /dev/null +++ b/test/fixtures/jsx/basic/keyword-tag/expected.json @@ -0,0 +1,128 @@ +{ + "type": "File", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "expression": { + "type": "JSXElement", + "start": 0, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "openingElement": { + "type": "JSXOpeningElement", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + }, + "attributes": [], + "name": { + "type": "JSXIdentifier", + "start": 1, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "name": "var" + }, + "selfClosing": false + }, + "closingElement": { + "type": "JSXClosingElement", + "start": 5, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "name": { + "type": "JSXIdentifier", + "start": 7, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "name": "var" + } + }, + "children": [] + } + } + ] + } +} \ No newline at end of file diff --git a/test/fixtures/jsx/basic/namespace-tag/expected.json b/test/fixtures/jsx/basic/namespace-tag/expected.json new file mode 100644 index 0000000000..9070b5a80f --- /dev/null +++ b/test/fixtures/jsx/basic/namespace-tag/expected.json @@ -0,0 +1,286 @@ +{ + "type": "File", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "expression": { + "type": "JSXElement", + "start": 0, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "openingElement": { + "type": "JSXOpeningElement", + "start": 0, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "attributes": [], + "name": { + "type": "JSXNamespacedName", + "start": 1, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "namespace": { + "type": "JSXIdentifier", + "start": 1, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "name": "Foo" + }, + "name": { + "type": "JSXIdentifier", + "start": 5, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "name": "Bar" + } + }, + "selfClosing": true + }, + "closingElement": null, + "children": [] + } + }, + { + "type": "ExpressionStatement", + "start": 13, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "expression": { + "type": "JSXElement", + "start": 13, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "openingElement": { + "type": "JSXOpeningElement", + "start": 13, + "end": 22, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 9 + } + }, + "attributes": [], + "name": { + "type": "JSXNamespacedName", + "start": 14, + "end": 21, + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 8 + } + }, + "namespace": { + "type": "JSXIdentifier", + "start": 14, + "end": 17, + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + }, + "name": "Foo" + }, + "name": { + "type": "JSXIdentifier", + "start": 18, + "end": 21, + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + }, + "name": "Bar" + } + }, + "selfClosing": false + }, + "closingElement": { + "type": "JSXClosingElement", + "start": 22, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "name": { + "type": "JSXNamespacedName", + "start": 24, + "end": 31, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "namespace": { + "type": "JSXIdentifier", + "start": 24, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "name": "Foo" + }, + "name": { + "type": "JSXIdentifier", + "start": 28, + "end": 31, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "name": "Bar" + } + } + }, + "children": [] + } + } + ] + } +} \ No newline at end of file diff --git a/test/fixtures/jsx/regression/1/expected.json b/test/fixtures/jsx/regression/1/expected.json index 5a09d6bfde..e81c2275a0 100644 --- a/test/fixtures/jsx/regression/1/expected.json +++ b/test/fixtures/jsx/regression/1/expected.json @@ -122,7 +122,7 @@ }, "children": [ { - "type": "Literal", + "type": "JSXText", "start": 3, "end": 7, "loc": { @@ -199,7 +199,7 @@ "name": "href" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 15, "end": 21, "loc": { @@ -269,7 +269,7 @@ }, "children": [ { - "type": "Literal", + "type": "JSXText", "start": 22, "end": 26, "loc": { @@ -289,7 +289,7 @@ ] }, { - "type": "Literal", + "type": "JSXText", "start": 30, "end": 34, "loc": { diff --git a/test/fixtures/jsx/regression/4/expected.json b/test/fixtures/jsx/regression/4/expected.json index f3c24eb4d5..3b7587e891 100644 --- a/test/fixtures/jsx/regression/4/expected.json +++ b/test/fixtures/jsx/regression/4/expected.json @@ -122,7 +122,7 @@ }, "children": [ { - "type": "Literal", + "type": "JSXText", "start": 5, "end": 10, "loc": { diff --git a/test/fixtures/jsx/regression/6/expected.json b/test/fixtures/jsx/regression/6/expected.json index dda6e404ca..8a34a3b69a 100644 --- a/test/fixtures/jsx/regression/6/expected.json +++ b/test/fixtures/jsx/regression/6/expected.json @@ -102,7 +102,7 @@ "name": "pre" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 9, "end": 18, "loc": { diff --git a/test/fixtures/jsx/regression/7/expected.json b/test/fixtures/jsx/regression/7/expected.json index a37ebed7c8..0a092459c2 100644 --- a/test/fixtures/jsx/regression/7/expected.json +++ b/test/fixtures/jsx/regression/7/expected.json @@ -102,7 +102,7 @@ "name": "d" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 8, "end": 60, "loc": { diff --git a/test/fixtures/jsx/regression/issue-2083/expected.json b/test/fixtures/jsx/regression/issue-2083/expected.json index 258d659c46..fd7a654768 100644 --- a/test/fixtures/jsx/regression/issue-2083/expected.json +++ b/test/fixtures/jsx/regression/issue-2083/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 0, "end": 4, "loc": { diff --git a/test/fixtures/jsx/regression/issue-2114/expected.json b/test/fixtures/jsx/regression/issue-2114/expected.json index 9259331d8f..303c0e4ca7 100644 --- a/test/fixtures/jsx/regression/issue-2114/expected.json +++ b/test/fixtures/jsx/regression/issue-2114/expected.json @@ -102,7 +102,7 @@ "name": "pattern" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 43, "loc": {