-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
Fully implement EmptyStatement #1151
Conversation
@Razican Can you help me review the pull request? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation looks perfect to me. Could we additionally add some tests like the ones in #892 to make sure we correctly execute those? And can we add some parsing tests where we see that multiple ;
characters are parsed as empty statements?
Test262 conformance changes:
|
Benchmarks
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It looks very good now :)
* add EmptyStatement * add comments * format code * add test * add test * fmt
This Pull Request fixes/closes #892.
It changes the following:
Empty
.Why didn't I remove this line
If we remove this line,
var a;
will be two statements, a VariableStatement and an EmptyStatement. That's not what we want.Why we must add this Empty Node?
Otherwise,
if(foo()) ;
won't work. We must do the same as statement section in ecma262 spec.