Skip to content

Commit

Permalink
parser: sync comments with formal grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
ifreund committed Jun 8, 2022
1 parent 868a39b commit 29dd9a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/std/zig/parse.zig
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ const Parser = struct {
/// / TopLevelComptime ContainerDeclarations
/// / KEYWORD_pub? TopLevelDecl ContainerDeclarations
/// /
/// TopLevelComptime <- KEYWORD_comptime BlockExpr
/// TopLevelComptime <- KEYWORD_comptime Block
fn parseContainerMembers(p: *Parser) !Members {
const scratch_top = p.scratch.items.len;
defer p.scratch.shrinkRetainingCapacity(scratch_top);
Expand Down Expand Up @@ -849,7 +849,7 @@ const Parser = struct {
}
}

/// ContainerField <- KEYWORD_comptime? IDENTIFIER (COLON (KEYWORD_anytype / TypeExpr) ByteAlign?)? (EQUAL Expr)?
/// ContainerField <- KEYWORD_comptime? IDENTIFIER (COLON TypeExpr ByteAlign?)? (EQUAL Expr)?
fn expectContainerField(p: *Parser) !Node.Index {
_ = p.eatToken(.keyword_comptime);
const name_token = p.assertToken(.identifier);
Expand Down

0 comments on commit 29dd9a5

Please sign in to comment.