You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 19, 2018. It is now read-only.
Currently, when an error is thrown for an unexpected token, it looks like this: SyntaxError: Unexpected token, expected ; (2:7). It looks like the error message is malformed or something is buggy in Babylon - can we make this better? Haven't looked into implementing yet, but some initial ideas:
Just report the "unexpected token" and remove the "expected" part (Even if just this change was made, I think it would make more sense than the current output): SyntaxError: Unexpected token (2:7)
Report the token that was unexpected (not sure how difficult this would be): SyntaxError: Unexpected token foo (2:7)
Input Code
Not a bug, but an example of when this error is shown is:
onstfoo=1;
Babylon/Babel Configuration
N/A
Expected Behavior
To output a more complete error message. Perhaps print out which token was unexpected?
Current Behavior
The error that currently gets thrown is SyntaxError: Unexpected token, expected ; (2:7), which looks like unfinished behavior/a bug.
Your Environment
software
version
Babylon
Master branch
node
v6.9.1
npm
v3.10.9
Operating System
OSX
The text was updated successfully, but these errors were encountered:
Unexpected token, expected ; is a really confusing message. Seems to me like the error message should just be Unexpected token in those cases where there isn't an expected value.
Currently, when an error is thrown for an unexpected token, it looks like this:
SyntaxError: Unexpected token, expected ; (2:7)
. It looks like the error message is malformed or something is buggy in Babylon - can we make this better? Haven't looked into implementing yet, but some initial ideas:SyntaxError: Unexpected token (2:7)
SyntaxError: Unexpected token foo (2:7)
Input Code
Not a bug, but an example of when this error is shown is:
Babylon/Babel Configuration
N/A
Expected Behavior
To output a more complete error message. Perhaps print out which token was unexpected?
Current Behavior
The error that currently gets thrown is
SyntaxError: Unexpected token, expected ; (2:7)
, which looks like unfinished behavior/a bug.Your Environment
The text was updated successfully, but these errors were encountered: