authorgravatar for matthew.h.borkowski@gmail.comMatthew Borkowski <matthew.h.borkowski@gmail.com> 2021-05-27 20:40:09-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-27 21:03:49-04:00
log673ae5b457479760ff8e08b3e06917a4b2651436
tree35a1cbc8b03e9154fc86c8f09f3cd660adca718b
parentc0aa9292bafa1a10c43297d3d5929049fab84e9a

update comments to match changes to the formal grammar


1 files changed, 6 insertions(+), 7 deletions(-)

lib/std/zig/parse.zig+6-7
......@@ -191,12 +191,11 @@ const Parser = struct {
191191 return error.ParseError;
192192 }
193193
194 /// ContainerMembers
195 /// <- TestDecl ContainerMembers
196 /// / TopLevelComptime ContainerMembers
197 /// / KEYWORD_pub? TopLevelDecl ContainerMembers
198 /// / ContainerField COMMA ContainerMembers
199 /// / ContainerField
194 /// ContainerMembers <- ContainerDeclarations (ContainerField COMMA)* (ContainerField / ContainerDeclarations)
195 /// ContainerDeclarations
196 /// <- TestDecl ContainerDeclarations
197 /// / TopLevelComptime ContainerDeclarations
198 /// / KEYWORD_pub? TopLevelDecl ContainerDeclarations
200199 /// /
201200 /// TopLevelComptime <- KEYWORD_comptime BlockExpr
202201 fn parseContainerMembers(p: *Parser) !Members {
......@@ -774,7 +773,7 @@ const Parser = struct {
774773 }
775774 }
776775
777 /// ContainerField <- KEYWORD_comptime? IDENTIFIER (COLON TypeExpr ByteAlign?)? (EQUAL Expr)?
776 /// ContainerField <- KEYWORD_comptime? IDENTIFIER (COLON (KEYWORD_anytype / TypeExpr) ByteAlign?)? (EQUAL Expr)?
778777 fn expectContainerField(p: *Parser) !Node.Index {
779778 const comptime_token = p.eatToken(.keyword_comptime);
780779 const name_token = p.assertToken(.identifier);