diff --git a/packages/babel-parser/test/fixtures/es2015/template/error-after-newline/input.js b/packages/babel-parser/test/fixtures/es2015/template/error-after-newline/input.js new file mode 100644 index 000000000000..cb5d7265e799 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/template/error-after-newline/input.js @@ -0,0 +1,3 @@ +` +\u{12_34} +`; \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/template/error-after-newline/output.json b/packages/babel-parser/test/fixtures/es2015/template/error-after-newline/output.json new file mode 100644 index 000000000000..94e624380fed --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/template/error-after-newline/output.json @@ -0,0 +1,36 @@ +{ + "type": "File", + "start":0,"end":14,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":2,"index":14}}, + "errors": [ + "SyntaxError: Numeric separators are not allowed inside unicode escape sequences or hex escape sequences. (1:7)" + ], + "program": { + "type": "Program", + "start":0,"end":14,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":2,"index":14}}, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start":0,"end":14,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":2,"index":14}}, + "expression": { + "type": "TemplateLiteral", + "start":0,"end":13,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":13}}, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start":1,"end":12,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":3,"column":0,"index":12}}, + "value": { + "raw": "\n\\u{12_34}\n", + "cooked": "\nሴ\n" + }, + "tail": true + } + ] + } + } + ], + "directives": [] + } +}