docs: update grammar to remove C strings and add anon literals

This commit is contained in:
hryx 2020-01-12 00:35:30 -08:00 committed by Andrew Kelley
parent a6f6d8d2f7
commit c4770e7aa5

View File

@ -10323,6 +10323,7 @@ PrimaryTypeExpr
/ CHAR_LITERAL / CHAR_LITERAL
/ ContainerDecl / ContainerDecl
/ DOT IDENTIFIER / DOT IDENTIFIER
/ DOT InitList
/ ErrorSetDecl / ErrorSetDecl
/ FLOAT / FLOAT
/ FnProto / FnProto
@ -10546,7 +10547,6 @@ string_char
line_comment <- '//'[^\n]* line_comment <- '//'[^\n]*
line_string <- ("\\\\" [^\n]* [ \n]*)+ line_string <- ("\\\\" [^\n]* [ \n]*)+
line_cstring <- ("c\\\\" [^\n]* [ \n]*)+
skip <- ([ \n] / line_comment)* skip <- ([ \n] / line_comment)*
CHAR_LITERAL <- "'" char_char "'" skip CHAR_LITERAL <- "'" char_char "'" skip
@ -10561,11 +10561,11 @@ INTEGER
/ "0x" hex+ skip / "0x" hex+ skip
/ [0-9]+ skip / [0-9]+ skip
STRINGLITERAL STRINGLITERAL
<- "c"? "\"" string_char* "\"" skip <- "\"" string_char* "\"" skip
/ line_string skip / line_string skip
/ line_cstring skip / line_cstring skip
IDENTIFIER IDENTIFIER
<- !keyword ("c" !["\\] / [A-Zabd-z_]) [A-Za-z0-9_]* skip <- !keyword [A-Za-z_] [A-Za-z0-9_]* skip
/ "@\"" string_char* "\"" skip / "@\"" string_char* "\"" skip
BUILTINIDENTIFIER <- "@"[A-Za-z_][A-Za-z0-9_]* skip BUILTINIDENTIFIER <- "@"[A-Za-z_][A-Za-z0-9_]* skip