Support c string literals

This commit is contained in:
Lukas Wirth 2023-05-18 11:06:05 +02:00
parent 099b5b3b15
commit 4b577e2bc8
21 changed files with 176 additions and 34 deletions

View file

@ -573,10 +573,11 @@ impl Field {
fn lower(grammar: &Grammar) -> AstSrc {
let mut res = AstSrc {
tokens: "Whitespace Comment String ByteString IntNumber FloatNumber Char Byte Ident"
.split_ascii_whitespace()
.map(|it| it.to_string())
.collect::<Vec<_>>(),
tokens:
"Whitespace Comment String ByteString CString IntNumber FloatNumber Char Byte Ident"
.split_ascii_whitespace()
.map(|it| it.to_string())
.collect::<Vec<_>>(),
..Default::default()
};