Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for raw string literals; tweak lexer/ast.
1. Add raw strings. * `$$ ... $$` strings are now raw strings. * New syntax: `r'...'` and `r"..."` -- raw string literals. Raw strings do not process any escapes, meaning that `\` symbol acts just as any other one. 2. Tweak string literals. Regular strings no longer accept \xhh codes over 0x7F. This is modeled after Rust strings [1], quoting: "Higher values are not permitted because it is ambiguous whether they mean Unicode code points or byte values." 3. New AST nodes. EdgeQL and IR implementations got two new nodes: `StringConstant` and `RawStringConstant`. SQL has also a new node: `EscapedStringConstant` (compiles to an `E'...'` string). [1] https://doc.rust-lang.org/reference/tokens.html#character-escapes
- Loading branch information
Showing
21 changed files
with
310 additions
and
69 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
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
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
Oops, something went wrong.