-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add method for determining whether child at given index is wrapped in not_null<>. Rationale: Passing child that is wrapped in not_null to SyntaxRewriter::remove(), results in failing not_null assertion. When you remove quite a lot arbitrary nodes it gets cumbersome to avoid this issue "manually". Thanks to this isChildOptional(), one can re-implement visit/visitDefault methods to pass handler information that node must not be removed.
- Loading branch information
Showing
3 changed files
with
39 additions
and
0 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
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