Closed ikarienator closed 9 years ago
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literals
We need to represent both "tagged" or "untagged" template literals.
For example:
raw`x${y}z`
should have:
raw
x
y
z
Not implemented
interface TemplateElement <: Node { type = "TemplateElement", value: { raw: string, cooked: string }, tail: boolean } interface TemplateLiteral <: Expression { type = "TemplateLiteral", expressions: [Expression], quasis: [TemplateElement] } interface TaggedTemplateExpression <: Expression { type = "TaggedTemplateExpression", tag: Expression, quasi: TemplateLiteral }
Same as Esprima-harmony
Kinda bad naming...
interface TemplateString : Expression { attribute Expression? tag; attribute (Expression or TemplateLiteral)[] elements; }; interface TemplateLiteral : Node { attribute string value; }
I take it you missed #25?
I did...
SPEC:
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literals
We need to represent both "tagged" or "untagged" template literals.
For example:
should have:
raw
as an expressionx
as a template literal elementy
as an expressionz
as a template literal elementSpiderMonkey Parser API:
Not implemented
Esprima-harmony:
Acorn:
Same as Esprima-harmony
Shift-API:
Kinda bad naming...