We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiline enum
line break enum
enum parsing
I don't think this is a regression.
Playground link with relevant code
enum E { foo, bar }
enum F { foo, bar }
These declarations are parsed as valid enum declarations.
enum
enum declarations containing a line break between the enum keyword and the identifier should be parsed as multiple expressions.
- EnumDeclaration + ExpressionStatement: Identifier: enum + ExpressionStatement: Identifier: E + Block
babel/babel#12773, babel/babel#12776 Also consider: babel/babel#12776 (comment) /cc @armano2 @JLHwung @nicolo-ribaudo
The text was updated successfully, but these errors were encountered:
Note that I don't think that this is a bug: enum is a reserved word (and not a valid identifier), so there is no ambiguity allowing a line terminator.
(this issue was probably opened in response to babel/babel#12776 (comment)).
Sorry, something went wrong.
Correct, this is working as intended.
No branches or pull requests
Bug Report
π Search Terms
multiline enum
line break enum
enum parsing
π Version & Regression Information
I don't think this is a regression.
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
These declarations are parsed as valid
enum
declarations.π Expected behavior
enum
declarations containing a line break between theenum
keyword and the identifier should be parsed as multiple expressions.Linked issues
babel/babel#12773, babel/babel#12776
Also consider: babel/babel#12776 (comment)
/cc @armano2 @JLHwung @nicolo-ribaudo
The text was updated successfully, but these errors were encountered: