mirror of
https://github.com/ziglang/zig.git
synced 2025-12-12 17:23:09 +00:00
docs: update grammar to remove C strings and add anon literals
This commit is contained in:
parent
a6f6d8d2f7
commit
c4770e7aa5
@ -10323,6 +10323,7 @@ PrimaryTypeExpr
|
||||
/ CHAR_LITERAL
|
||||
/ ContainerDecl
|
||||
/ DOT IDENTIFIER
|
||||
/ DOT InitList
|
||||
/ ErrorSetDecl
|
||||
/ FLOAT
|
||||
/ FnProto
|
||||
@ -10546,7 +10547,6 @@ string_char
|
||||
|
||||
line_comment <- '//'[^\n]*
|
||||
line_string <- ("\\\\" [^\n]* [ \n]*)+
|
||||
line_cstring <- ("c\\\\" [^\n]* [ \n]*)+
|
||||
skip <- ([ \n] / line_comment)*
|
||||
|
||||
CHAR_LITERAL <- "'" char_char "'" skip
|
||||
@ -10561,11 +10561,11 @@ INTEGER
|
||||
/ "0x" hex+ skip
|
||||
/ [0-9]+ skip
|
||||
STRINGLITERAL
|
||||
<- "c"? "\"" string_char* "\"" skip
|
||||
<- "\"" string_char* "\"" skip
|
||||
/ line_string skip
|
||||
/ line_cstring skip
|
||||
IDENTIFIER
|
||||
<- !keyword ("c" !["\\] / [A-Zabd-z_]) [A-Za-z0-9_]* skip
|
||||
<- !keyword [A-Za-z_] [A-Za-z0-9_]* skip
|
||||
/ "@\"" string_char* "\"" skip
|
||||
BUILTINIDENTIFIER <- "@"[A-Za-z_][A-Za-z0-9_]* skip
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user