Skip to content

Commit

Permalink
docs: update grammar to remove C strings and add anon literals
Browse files Browse the repository at this point in the history
  • Loading branch information
hryx authored and andrewrk committed Jan 12, 2020
1 parent a6f6d8d commit c4770e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/langref.html.in
Expand Up @@ -10323,6 +10323,7 @@ PrimaryTypeExpr
/ CHAR_LITERAL
/ ContainerDecl
/ DOT IDENTIFIER
/ DOT InitList
/ ErrorSetDecl
/ FLOAT
/ FnProto
Expand Down Expand Up @@ -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
Expand All @@ -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

This comment has been minimized.

Copy link
@xackus

xackus Jan 12, 2020

Contributor

looks like you forgot this

This comment has been minimized.

Copy link
@hryx

hryx Jan 12, 2020

Author Contributor

@xackus You are correct - thanks for catching that.

This file has gotten out of sync with ziglang/zig-spec before. Not sure how to automatically prevent that without a git submodule or combining the repos.

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

Expand Down

0 comments on commit c4770e7

Please sign in to comment.