-
-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There were a few ways this might have been designed, but modeling it as a node wrapping the piece of regex that is followed by sigspace seems the least error-prone. A flag on every regex node that it's followed by sigspace is more memory intensive in the common case, and not always meaningful anyway, plus it would be a nuisance to apply it everywhere. It does force all of the decision-making into whatever is constructing the AST nodes, but so will force some whitespace insertion onto any pretty printers too (as well as making sure they already think they are emitting sigspace code, if they want to properly handle synthetic constructions).
- Loading branch information
Showing
2 changed files
with
42 additions
and
7 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