-
-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a Parser Idempotency Issue (#3172)
* 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]>
- Loading branch information
1 parent
e51e628
commit 1fe164b
Showing
2 changed files
with
18 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,3 +122,15 @@ fn switch() { | |
"#, | ||
); | ||
} | ||
|
||
#[test] | ||
fn with() { | ||
test_formatting( | ||
r#" | ||
with (this) { | ||
{ | ||
} | ||
} | ||
"#, | ||
); | ||
} |