parser: sync comments with formal grammar

This commit is contained in:
Isaac Freund 2022-06-06 16:13:50 +02:00
parent 868a39b296
commit 29dd9a5880

View File

@ -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);
@ -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);