-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
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
Export statement followed by expression #77
Comments
Since we are re-using the if let Decl::Var { semi_colon, .. } = &lex {
semi = semi_colon.clone();
} |
Wouldn't we get two semicolons now when we write this out? |
That is a good observation! In the PR I have up currently (#78) I move the semicolon to the outer decl instead of cloning it. |
Ah makes sense. Good job :) |
This was merged as part of |
Following code results in an error. But only when written in one line.
export let a; a=1;
Works like this:
It seems function
parse_export_decl
tries to consume a semicolon twice. Once insideparse_lexical_decl
and once inside the function itself. Instead of semicolon it also accepts newline.Can we simply remove the
consume_semicolon
call insideparse_export_decl
?Is the semicolon preferred to be in the inner or outer expression?
The text was updated successfully, but these errors were encountered: