[loose parser] Don't tokenize ellipsis when ecmaVersion < 6
Issue marijnh/tern#493
This commit is contained in:
parent
7264bc0178
commit
9a617a59e4
@ -80,7 +80,7 @@
|
||||
for (;;) {
|
||||
try {
|
||||
var tok = fetchToken();
|
||||
if (tok.type === tt.dot && input.substr(tok.end, 1) === '.') {
|
||||
if (tok.type === tt.dot && input.substr(tok.end, 1) === '.' && options.ecmaVersion >= 6) {
|
||||
tok = fetchToken();
|
||||
tok.start--;
|
||||
tok.type = tt.ellipsis;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user