Add support for invalid escapes in tagged templates (#274)

Per the stage-3 TC39 proposal:
https://github.com/tc39/proposal-template-literal-revision
This commit is contained in:
Kevin Gibbons 2017-03-22 09:50:34 +13:00 committed by Henry Zhu
parent 5f048b4f5d
commit 2e467ef3bc
290 changed files with 11491 additions and 38 deletions

View File

@ -134,3 +134,4 @@ require("babylon").parse("code", {
- `functionBind`
- `functionSent`
- `dynamicImport`
- `templateInvalidEscapes`

View File

@ -946,7 +946,7 @@ interface TemplateElement <: Node {
type: "TemplateElement";
tail: boolean;
value: {
cooked: string;
cooked: string | null;
raw: string;
};
}

View File

@ -317,7 +317,7 @@ pp.parseSubscripts = function (base, startPos, startLoc, noCalls) {
} else if (this.match(tt.backQuote)) {
const node = this.startNodeAt(startPos, startLoc);
node.tag = base;
node.quasi = this.parseTemplate();
node.quasi = this.parseTemplate(true);
base = this.finishNode(node, "TaggedTemplateExpression");
} else {
return base;
@ -506,7 +506,7 @@ pp.parseExprAtom = function (refShorthandDefaultPos) {
return this.parseNew();
case tt.backQuote:
return this.parseTemplate();
return this.parseTemplate(false);
case tt.doubleColon:
node = this.startNode();
@ -685,8 +685,15 @@ pp.parseNew = function () {
// Parse template expression.
pp.parseTemplateElement = function () {
pp.parseTemplateElement = function (isTagged) {
const elem = this.startNode();
if (this.state.value === null) {
if (!isTagged || !this.hasPlugin("templateInvalidEscapes")) {
this.raise(this.state.invalidTemplateEscapePosition, "Invalid escape sequence in template");
} else {
this.state.invalidTemplateEscapePosition = null;
}
}
elem.value = {
raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
cooked: this.state.value
@ -696,17 +703,17 @@ pp.parseTemplateElement = function () {
return this.finishNode(elem, "TemplateElement");
};
pp.parseTemplate = function () {
pp.parseTemplate = function (isTagged) {
const node = this.startNode();
this.next();
node.expressions = [];
let curElt = this.parseTemplateElement();
let curElt = this.parseTemplateElement(isTagged);
node.quasis = [curElt];
while (!curElt.tail) {
this.expect(tt.dollarBraceL);
node.expressions.push(this.parseExpression());
this.expect(tt.braceR);
node.quasis.push(curElt = this.parseTemplateElement());
node.quasis.push(curElt = this.parseTemplateElement(isTagged));
}
this.next();
return this.finishNode(node, "TemplateLiteral");

View File

@ -599,17 +599,26 @@ export default class Tokenizer {
// Read a string value, interpreting backslash-escapes.
readCodePoint() {
readCodePoint(throwOnInvalid) {
const ch = this.input.charCodeAt(this.state.pos);
let code;
if (ch === 123) {
if (ch === 123) { // '{'
const codePos = ++this.state.pos;
code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos);
code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, throwOnInvalid);
++this.state.pos;
if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds");
if (code === null) {
--this.state.invalidTemplateEscapePosition; // to point to the '\'' instead of the 'u'
} else if (code > 0x10FFFF) {
if (throwOnInvalid) {
this.raise(codePos, "Code point out of bounds");
} else {
this.state.invalidTemplateEscapePosition = codePos - 2;
return null;
}
}
} else {
code = this.readHexChar(4);
code = this.readHexChar(4, throwOnInvalid);
}
return code;
}
@ -636,7 +645,7 @@ export default class Tokenizer {
// Reads template string tokens.
readTmplToken() {
let out = "", chunkStart = this.state.pos;
let out = "", chunkStart = this.state.pos, containsInvalid = false;
for (;;) {
if (this.state.pos >= this.input.length) this.raise(this.state.start, "Unterminated template");
const ch = this.input.charCodeAt(this.state.pos);
@ -651,11 +660,16 @@ export default class Tokenizer {
}
}
out += this.input.slice(chunkStart, this.state.pos);
return this.finishToken(tt.template, out);
return this.finishToken(tt.template, containsInvalid ? null : out);
}
if (ch === 92) { // '\'
out += this.input.slice(chunkStart, this.state.pos);
out += this.readEscapedChar(true);
const escaped = this.readEscapedChar(true);
if (escaped === null) {
containsInvalid = true;
} else {
out += escaped;
}
chunkStart = this.state.pos;
} else if (isNewLine(ch)) {
out += this.input.slice(chunkStart, this.state.pos);
@ -682,13 +696,20 @@ export default class Tokenizer {
// Used to read escaped characters
readEscapedChar(inTemplate) {
const throwOnInvalid = !inTemplate;
const ch = this.input.charCodeAt(++this.state.pos);
++this.state.pos;
switch (ch) {
case 110: return "\n"; // 'n' -> '\n'
case 114: return "\r"; // 'r' -> '\r'
case 120: return String.fromCharCode(this.readHexChar(2)); // 'x'
case 117: return codePointToString(this.readCodePoint()); // 'u'
case 120: { // 'x'
const code = this.readHexChar(2, throwOnInvalid);
return code === null ? null : String.fromCharCode(code);
}
case 117: { // 'u'
const code = this.readCodePoint(throwOnInvalid);
return code === null ? null : codePointToString(code);
}
case 116: return "\t"; // 't' -> '\t'
case 98: return "\b"; // 'b' -> '\b'
case 118: return "\u000b"; // 'v' -> '\u000b'
@ -700,6 +721,7 @@ export default class Tokenizer {
return "";
default:
if (ch >= 48 && ch <= 55) {
const codePos = this.state.pos - 1;
let octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0];
let octal = parseInt(octalStr, 8);
if (octal > 255) {
@ -707,12 +729,16 @@ export default class Tokenizer {
octal = parseInt(octalStr, 8);
}
if (octal > 0) {
if (!this.state.containsOctal) {
if (inTemplate) {
this.state.invalidTemplateEscapePosition = codePos;
return null;
} else if (this.state.strict) {
this.raise(codePos, "Octal literal in strict mode");
} else if (!this.state.containsOctal) {
// These properties are only used to throw an error for an octal which occurs
// in a directive which occurs prior to a "use strict" directive.
this.state.containsOctal = true;
this.state.octalPosition = this.state.pos - 2;
}
if (this.state.strict || inTemplate) {
this.raise(this.state.pos - 2, "Octal literal in strict mode");
this.state.octalPosition = codePos;
}
}
this.state.pos += octalStr.length - 1;
@ -722,12 +748,19 @@ export default class Tokenizer {
}
}
// Used to read character escape sequences ('\x', '\u', '\U').
// Used to read character escape sequences ('\x', '\u').
readHexChar(len) {
readHexChar(len, throwOnInvalid) {
const codePos = this.state.pos;
const n = this.readInt(16, len);
if (n === null) this.raise(codePos, "Bad character escape sequence");
if (n === null) {
if (throwOnInvalid) {
this.raise(codePos, "Bad character escape sequence");
} else {
this.state.pos = codePos - 1;
this.state.invalidTemplateEscapePosition = codePos - 1;
}
}
return n;
}
@ -755,7 +788,7 @@ export default class Tokenizer {
}
++this.state.pos;
const esc = this.readCodePoint();
const esc = this.readCodePoint(true);
if (!(first ? isIdentifierStart : isIdentifierChar)(esc, true)) {
this.raise(escStart, "Invalid Unicode escape");
}

View File

@ -50,6 +50,8 @@ export default class State {
this.containsEsc = this.containsOctal = false;
this.octalPosition = null;
this.invalidTemplateEscapePosition = null;
this.exportedIdentifiers = [];
return this;

View File

@ -1,3 +1,3 @@
{
"throws": "Octal literal in strict mode (1:34)"
"throws": "Octal literal in strict mode (1:35)"
}

View File

@ -1,3 +1,3 @@
{
"throws": "Octal literal in strict mode (1:37)"
"throws": "Octal literal in strict mode (1:38)"
}

View File

@ -1,3 +1,3 @@
{
"throws": "Octal literal in strict mode (1:68)"
"throws": "Octal literal in strict mode (1:69)"
}

View File

@ -1,3 +1,3 @@
{
"throws": "Octal literal in strict mode (1:22)"
"throws": "Invalid escape sequence in template (1:23)"
}

View File

@ -1,3 +1,3 @@
{
"throws": "Octal literal in strict mode (1:1)"
"throws": "Invalid escape sequence in template (1:2)"
}

View File

@ -1,3 +1,3 @@
{
"throws": "Octal literal in strict mode (1:1)"
"throws": "Invalid escape sequence in template (1:2)"
}

View File

@ -1,3 +1,3 @@
{
"throws": "Octal literal in strict mode (1:1)"
"throws": "Octal literal in strict mode (1:2)"
}

View File

@ -1,3 +1,3 @@
{
"throws": "Octal literal in strict mode (1:34)"
"throws": "Octal literal in strict mode (1:35)"
}

View File

@ -1,3 +1,3 @@
{
"throws": "Octal literal in strict mode (1:37)"
"throws": "Octal literal in strict mode (1:38)"
}

View File

@ -1,3 +1,3 @@
{
"throws": "Octal literal in strict mode (1:35)"
"throws": "Octal literal in strict mode (1:36)"
}

View File

@ -1,3 +1,3 @@
{
"throws": "Octal literal in strict mode (1:35)"
"throws": "Octal literal in strict mode (1:36)"
}

View File

@ -1,3 +1,3 @@
{
"throws": "Octal literal in strict mode (1:68)"
"throws": "Octal literal in strict mode (1:69)"
}

View File

@ -0,0 +1 @@
sampleTag`\01`

View File

@ -0,0 +1,119 @@
{
"type": "File",
"start": 0,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 14
}
},
"program": {
"type": "Program",
"start": 0,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 14
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 14
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 14
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 14
}
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 13
}
},
"value": {
"raw": "\\01",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\xg${0}right`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"program": {
"type": "Program",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 23
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 15,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 13
}
},
"value": {
"raw": "\\xg",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 17,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 22
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\xg`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 22
}
},
"program": {
"type": "Program",
"start": 0,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 22
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 22
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 22
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 22
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 21
}
},
"value": {
"raw": "\\xg",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\xg${1}right`

View File

@ -0,0 +1,200 @@
{
"type": "File",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"program": {
"type": "Program",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 31
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
{
"type": "NumericLiteral",
"start": 23,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 24
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 21
}
},
"value": {
"raw": "\\xg",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 25,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 30
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\xAg`

View File

@ -0,0 +1,119 @@
{
"type": "File",
"start": 0,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 15
}
},
"program": {
"type": "Program",
"start": 0,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 15
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 15
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 15
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 15
}
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "\\xAg",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\xAg${0}right`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"program": {
"type": "Program",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 24
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "\\xAg",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 23
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\xAg`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"program": {
"type": "Program",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 23
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 22
}
},
"value": {
"raw": "\\xAg",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\xAg${1}right`

View File

@ -0,0 +1,200 @@
{
"type": "File",
"start": 0,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 32
}
},
"program": {
"type": "Program",
"start": 0,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 32
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 32
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 32
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 32
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
{
"type": "NumericLiteral",
"start": 24,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 25
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 22
}
},
"value": {
"raw": "\\xAg",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 26,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 31
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u0`

View File

@ -0,0 +1,119 @@
{
"type": "File",
"start": 0,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 14
}
},
"program": {
"type": "Program",
"start": 0,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 14
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 14
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 14
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 14
}
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 13
}
},
"value": {
"raw": "\\u0",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u0${0}right`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"program": {
"type": "Program",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 23
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 15,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 13
}
},
"value": {
"raw": "\\u0",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 17,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 22
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u0`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 22
}
},
"program": {
"type": "Program",
"start": 0,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 22
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 22
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 22
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 22
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 21
}
},
"value": {
"raw": "\\u0",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\01${0}right`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"program": {
"type": "Program",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 23
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 15,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 13
}
},
"value": {
"raw": "\\01",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 17,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 22
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u0${1}right`

View File

@ -0,0 +1,200 @@
{
"type": "File",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"program": {
"type": "Program",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 31
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
{
"type": "NumericLiteral",
"start": 23,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 24
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 21
}
},
"value": {
"raw": "\\u0",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 25,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 30
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u0g`

View File

@ -0,0 +1,119 @@
{
"type": "File",
"start": 0,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 15
}
},
"program": {
"type": "Program",
"start": 0,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 15
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 15
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 15
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 15
}
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "\\u0g",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u0g${0}right`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"program": {
"type": "Program",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 24
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "\\u0g",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 23
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u0g`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"program": {
"type": "Program",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 23
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 22
}
},
"value": {
"raw": "\\u0g",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u0g${1}right`

View File

@ -0,0 +1,200 @@
{
"type": "File",
"start": 0,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 32
}
},
"program": {
"type": "Program",
"start": 0,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 32
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 32
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 32
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 32
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
{
"type": "NumericLiteral",
"start": 24,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 25
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 22
}
},
"value": {
"raw": "\\u0g",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 26,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 31
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u00g`

View File

@ -0,0 +1,119 @@
{
"type": "File",
"start": 0,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 16
}
},
"program": {
"type": "Program",
"start": 0,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 16
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 16
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 16
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 16
}
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 15
}
},
"value": {
"raw": "\\u00g",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u00g${0}right`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"program": {
"type": "Program",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 25
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 17,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 18
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 15
}
},
"value": {
"raw": "\\u00g",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 19,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 24
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u00g`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"program": {
"type": "Program",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 24
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 23
}
},
"value": {
"raw": "\\u00g",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u00g${1}right`

View File

@ -0,0 +1,200 @@
{
"type": "File",
"start": 0,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 33
}
},
"program": {
"type": "Program",
"start": 0,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 33
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 33
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 33
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 33
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
{
"type": "NumericLiteral",
"start": 25,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 26
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 23
}
},
"value": {
"raw": "\\u00g",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 27,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 32
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u000g`

View File

@ -0,0 +1,119 @@
{
"type": "File",
"start": 0,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 17
}
},
"program": {
"type": "Program",
"start": 0,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 17
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 17
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 17
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 17
}
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 16
}
},
"value": {
"raw": "\\u000g",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\01`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 22
}
},
"program": {
"type": "Program",
"start": 0,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 22
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 22
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 22
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 22
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 21
}
},
"value": {
"raw": "\\01",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u000g${0}right`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"program": {
"type": "Program",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 26
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 18,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 19
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 16
}
},
"value": {
"raw": "\\u000g",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 20,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 25
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u000g`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"program": {
"type": "Program",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 25
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 24
}
},
"value": {
"raw": "\\u000g",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u000g${1}right`

View File

@ -0,0 +1,200 @@
{
"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": "TaggedTemplateExpression",
"start": 0,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 34
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 34
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
{
"type": "NumericLiteral",
"start": 26,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 27
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 24
}
},
"value": {
"raw": "\\u000g",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 28,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 28
},
"end": {
"line": 1,
"column": 33
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u{}`

View File

@ -0,0 +1,119 @@
{
"type": "File",
"start": 0,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 15
}
},
"program": {
"type": "Program",
"start": 0,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 15
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 15
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 15
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 15
}
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "\\u{}",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u{}${0}right`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"program": {
"type": "Program",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 24
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "\\u{}",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 23
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u{}`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"program": {
"type": "Program",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 23
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 22
}
},
"value": {
"raw": "\\u{}",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u{}${1}right`

View File

@ -0,0 +1,200 @@
{
"type": "File",
"start": 0,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 32
}
},
"program": {
"type": "Program",
"start": 0,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 32
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 32
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 32
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 32
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
{
"type": "NumericLiteral",
"start": 24,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 25
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 22
}
},
"value": {
"raw": "\\u{}",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 26,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 31
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u{-0}`

View File

@ -0,0 +1,119 @@
{
"type": "File",
"start": 0,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 17
}
},
"program": {
"type": "Program",
"start": 0,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 17
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 17
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 17
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 17
}
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 16
}
},
"value": {
"raw": "\\u{-0}",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u{-0}${0}right`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"program": {
"type": "Program",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 26
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 18,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 19
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 16
}
},
"value": {
"raw": "\\u{-0}",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 20,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 25
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u{-0}`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"program": {
"type": "Program",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 25
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 24
}
},
"value": {
"raw": "\\u{-0}",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\01${1}right`

View File

@ -0,0 +1,200 @@
{
"type": "File",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"program": {
"type": "Program",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 31
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
{
"type": "NumericLiteral",
"start": 23,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 24
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 21
}
},
"value": {
"raw": "\\01",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 25,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 30
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u{-0}${1}right`

View File

@ -0,0 +1,200 @@
{
"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": "TaggedTemplateExpression",
"start": 0,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 34
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 34
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
{
"type": "NumericLiteral",
"start": 26,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 27
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 24
}
},
"value": {
"raw": "\\u{-0}",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 28,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 28
},
"end": {
"line": 1,
"column": 33
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u{g}`

View File

@ -0,0 +1,119 @@
{
"type": "File",
"start": 0,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 16
}
},
"program": {
"type": "Program",
"start": 0,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 16
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 16
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 16
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 16
}
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 15
}
},
"value": {
"raw": "\\u{g}",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u{g}${0}right`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"program": {
"type": "Program",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 25
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 25
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 17,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 18
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 15
}
},
"value": {
"raw": "\\u{g}",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 19,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 24
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u{g}`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"program": {
"type": "Program",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 24
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 23
}
},
"value": {
"raw": "\\u{g}",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u{g}${1}right`

View File

@ -0,0 +1,200 @@
{
"type": "File",
"start": 0,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 33
}
},
"program": {
"type": "Program",
"start": 0,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 33
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 33
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 33
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 33
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
{
"type": "NumericLiteral",
"start": 25,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 26
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 14
}
},
"value": {
"raw": "left",
"cooked": "left"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 18,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 23
}
},
"value": {
"raw": "\\u{g}",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 27,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 32
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u{`

View File

@ -0,0 +1,119 @@
{
"type": "File",
"start": 0,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 14
}
},
"program": {
"type": "Program",
"start": 0,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 14
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 14
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 14
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 14
}
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 13
}
},
"value": {
"raw": "\\u{",
"cooked": null
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`\u{${0}right`

View File

@ -0,0 +1,160 @@
{
"type": "File",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"program": {
"type": "Program",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"expression": {
"type": "TaggedTemplateExpression",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"tag": {
"type": "Identifier",
"start": 0,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "sampleTag"
},
"name": "sampleTag"
},
"quasi": {
"type": "TemplateLiteral",
"start": 9,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 23
}
},
"expressions": [
{
"type": "NumericLiteral",
"start": 15,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 10,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 13
}
},
"value": {
"raw": "\\u{",
"cooked": null
},
"tail": false
},
{
"type": "TemplateElement",
"start": 17,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 22
}
},
"value": {
"raw": "right",
"cooked": "right"
},
"tail": true
}
]
}
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
sampleTag`left${0}\u{`

Some files were not shown because too many files have changed in this diff Show More