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

@ -12,6 +12,8 @@ use super::*;
// let _ = r"d";
// let _ = b"e";
// let _ = br"f";
// let _ = c"g";
// let _ = cr"h";
// }
pub(crate) const LITERAL_FIRST: TokenSet = TokenSet::new(&[
T![true],
@ -22,6 +24,7 @@ pub(crate) const LITERAL_FIRST: TokenSet = TokenSet::new(&[
CHAR,
STRING,
BYTE_STRING,
C_STRING,
]);
pub(crate) fn literal(p: &mut Parser<'_>) -> Option<CompletedMarker> {