diff options
| author | Vexu <git@vexu.eu> | 2020-05-15 23:38:40 +0300 |
|---|---|---|
| committer | Vexu <git@vexu.eu> | 2020-05-15 23:50:47 +0300 |
| commit | b2f16d4484d2506d6a1e8a7d9f516f780d7fbd22 (patch) | |
| tree | d268fccb56981f6f060d46f73680af77e57e1af9 /src/parser.cpp | |
| parent | a00fd6e25469a9929defea95425a1c312a68cf0e (diff) | |
| download | zig-b2f16d4484d2506d6a1e8a7d9f516f780d7fbd22.tar.gz zig-b2f16d4484d2506d6a1e8a7d9f516f780d7fbd22.zip | |
fix infinite loop with mismatced bracket
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index fc9814f393..c6c5823672 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -538,8 +538,8 @@ enum ContainerFieldState { // <- TestDecl ContainerMembers // / TopLevelComptime ContainerMembers // / KEYWORD_pub? TopLevelDecl ContainerMembers -// / KEYWORD_comptime? ContainerField COMMA ContainerMembers -// / KEYWORD_comptime? ContainerField +// / ContainerField COMMA ContainerMembers +// / ContainerField // / static AstNodeContainerDecl ast_parse_container_members(ParseContext *pc) { AstNodeContainerDecl res = {}; @@ -862,7 +862,7 @@ static AstNode *ast_parse_var_decl(ParseContext *pc) { return res; } -// ContainerField <- IDENTIFIER (COLON TypeExpr ByteAlign?)? (EQUAL Expr)? +// ContainerField <- KEYWORD_comptime? IDENTIFIER (COLON TypeExpr ByteAlign?)? (EQUAL Expr)? static AstNode *ast_parse_container_field(ParseContext *pc) { Token *identifier = eat_token_if(pc, TokenIdSymbol); if (identifier == nullptr) |
