Adapt ES6 template handling to new tokenizer.
Avoid need for: * extra `templates` array in favor of new `tokContext`; * special location handling for first & last template elements; * separate `_templateContinued` token in favor of same `_template`. Adds: * token types for backQuote and dollarBraceL instead of skipping them so they can be handled (i.e. highlighted differently).
This commit is contained in:
committed by
Marijn Haverbeke
parent
f6c45ac59f
commit
6dee98d1b9
@@ -14077,7 +14077,7 @@ testFail("class A extends yield B { }", "Unexpected token (1:22)", {ecmaVersion:
|
||||
|
||||
testFail("class default", "Unexpected token (1:6)", {ecmaVersion: 6});
|
||||
|
||||
testFail("`test", "Unterminated template (1:0)", {ecmaVersion: 6});
|
||||
testFail("`test", "Unterminated template (1:1)", {ecmaVersion: 6});
|
||||
|
||||
testFail("switch `test`", "Unexpected token (1:7)", {ecmaVersion: 6});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user