• Mathias Bynens's avatar
    [parser] Improve error message for `import()` · dbcea115
    Mathias Bynens authored
    Currently, dynamic `import()` throws the following SyntaxError when
    used without a specifier:
    
        > import();
        < Uncaught SyntaxError: Unexpected token )
    
    From the error message, it seems this the result of the code snippet
    being seen as static `import` followed by parens, as opposed to
    `import()` with no specifier.
    
    This patch makes this error message more clear:
    
        > import();
        < SyntaxError: import() requires a specifier
    
    BUG=v8:7020,v8:6513
    
    Change-Id: I3519dfd0029f38d23da858a5499f1d226e794935
    Reviewed-on: https://chromium-review.googlesource.com/747141Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
    Commit-Queue: Mathias Bynens <mathias@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#49058}
    dbcea115
Name
Last commit
Last update
..
fail Loading commit data...
regress/fail Loading commit data...
README.md Loading commit data...
asm-assignment-undeclared.js Loading commit data...
asm-assignment-undeclared.out Loading commit data...
asm-function-mismatch-def.js Loading commit data...
asm-function-mismatch-def.out Loading commit data...
asm-function-mismatch-use.js Loading commit data...
asm-function-mismatch-use.out Loading commit data...
asm-function-redefined.js Loading commit data...
asm-function-redefined.out Loading commit data...
asm-function-undefined.js Loading commit data...
asm-function-undefined.out Loading commit data...
asm-function-variable-collision.js Loading commit data...
asm-function-variable-collision.out Loading commit data...
asm-import-wrong-annotation.js Loading commit data...
asm-import-wrong-annotation.out Loading commit data...
asm-import-wrong-object.js Loading commit data...
asm-import-wrong-object.out Loading commit data...
asm-linking-bogus-heap.js Loading commit data...
asm-linking-bogus-heap.out Loading commit data...
asm-linking-bogus-stdlib.js Loading commit data...
asm-linking-bogus-stdlib.out Loading commit data...
asm-linking-missing-heap.js Loading commit data...
asm-linking-missing-heap.out Loading commit data...
asm-missing-parameter-annotation.js Loading commit data...
asm-missing-parameter-annotation.out Loading commit data...
asm-missing-return-annotation.js Loading commit data...
asm-missing-return-annotation.out Loading commit data...
asm-table-mismatch-def.js Loading commit data...
asm-table-mismatch-def.out Loading commit data...
asm-table-mismatch-use.js Loading commit data...
asm-table-mismatch-use.out Loading commit data...
asm-table-redefined.js Loading commit data...
asm-table-redefined.out Loading commit data...
asm-table-undefined.js Loading commit data...
asm-table-undefined.out Loading commit data...
asm-table-variable-collision.js Loading commit data...
asm-table-variable-collision.out Loading commit data...
message.gyp Loading commit data...
message.isolate Loading commit data...
message.status Loading commit data...
non-use-strict-hex-escape.js Loading commit data...
non-use-strict-hex-escape.out Loading commit data...
non-use-strict-octal-escape.js Loading commit data...
non-use-strict-octal-escape.out Loading commit data...
non-use-strict-uhex-escape.js Loading commit data...
non-use-strict-uhex-escape.out Loading commit data...
nonstrict-arguments.js Loading commit data...
nonstrict-arguments.out Loading commit data...
nonstrict-eval.js Loading commit data...
nonstrict-eval.out Loading commit data...
nonstrict-with.js Loading commit data...
nonstrict-with.out Loading commit data...
settimeout.js Loading commit data...
settimeout.out Loading commit data...
strict-octal-indirect-regexp.js Loading commit data...
strict-octal-indirect-regexp.out Loading commit data...
strict-octal-regexp.js Loading commit data...
strict-octal-regexp.out Loading commit data...
testcfg.py Loading commit data...
try-catch-finally-no-message.js Loading commit data...
try-catch-finally-no-message.out Loading commit data...
try-catch-finally-return-in-finally.js Loading commit data...
try-catch-finally-return-in-finally.out Loading commit data...
try-finally-return-in-finally.js Loading commit data...
try-finally-return-in-finally.out Loading commit data...
wasm-trace-memory-interpreted.js Loading commit data...
wasm-trace-memory-interpreted.out Loading commit data...
wasm-trace-memory.js Loading commit data...
wasm-trace-memory.out Loading commit data...