-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split out the interpolation tokens in a raw_str
The syntax highlighting Xcode does is #"abc as String, \#( as Plain Text, value depending on the variables scope, ) as Plain Text and ."# as String. In order for us to do the same, we need to separate out the `\#(` from the prior `raw_str_part` (and the same with the closing parenthesis). This requires a slightly complicated dance between the grammar and the custom scanner, where the scanner validates the `\#(` but does not parse it, and the grammar parses it but does not validate it. In turn, the closing parenthesis gets consumed as a separate token by the grammar but must leave some remnant behind in the form of a synthetic external rule that just signals its position.
- Loading branch information
1 parent
90bc6e8
commit c152d39
Showing
3 changed files
with
62 additions
and
19 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