-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Parser Idempotency issue: braces added every time after each pass #3133
Comments
Hi, I'd like to work on this. |
@veera-sivarajan Assigned! |
@MahnurA Can you please let me know the command that shows the transformed code? I tried |
@veera-sivarajan I used the fuzzer to discover the bug, specifically the parser-idempotency fuzzer. However after #3059 was merged the fuzzers can't run anymore (not sure what broke but will be fixed soon), but you should still be able to run the previous version and see. |
This PR fixes boa-dev#3133 by correctly implementing `ToIndentedString` for `with` statement. It also replaces the existing `ToInternedString` implementation because it is implemented for all types implementing `ToIndentedString` in `boa_interner/src/lib.rs`.
I can confirm that this is still present. |
This PR fixes boa-dev#3133 by correctly implementing `ToIndentedString` for `with` statement. It also replaces the existing `ToInternedString` implementation because it is implemented for all types implementing `ToIndentedString` in `boa_interner/src/lib.rs`.
* Fix a Parser Idempotency Issue This PR fixes #3133 by correctly implementing `ToIndentedString` for `with` statement. It also replaces the existing `ToInternedString` implementation because it is implemented for all types implementing `ToIndentedString` in `boa_interner/src/lib.rs`. * Add test for with statement formatting --------- Co-authored-by: raskad <[email protected]>
Describe the bug
Starting and ending braces are added within an empty code block.
To Reproduce
This javascript
is transformed to the following, after passing through the parser:
And then to below, after another pass through:
Expected behavior
Multiple runs through the parser should result in the same output.
Build environment (please complete the following information):
Additional context
Found by #4822
The text was updated successfully, but these errors were encountered: