diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-06-13 15:04:23 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-06-13 15:04:23 +0100 |
| commit | 6a88dc322acfd54c55ed7dceebdeaa5ce18ce416 (patch) | |
| tree | 1bee3c6bd331cf7427451de9476564a9f7b030c9 /src/parser.cpp | |
| parent | 6b464e35586ebc8a8dadece60f188817f875da85 (diff) | |
Declaration grouping uses braces rather than parentheses
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index cd0e78c2a..8d7af3188 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -2553,16 +2553,16 @@ AstNode *parse_gen_decl(AstFile *f, Token token, ParseSpecFunc *func) { Token open = {}; Token close = {}; - if (f->curr_token.kind == Token_OpenParen) { + if (f->curr_token.kind == Token_OpenBrace) { specs = make_ast_node_array(f); - open = expect_token(f, Token_OpenParen); - while (f->curr_token.kind != Token_CloseParen && + open = expect_token(f, Token_OpenBrace); + while (f->curr_token.kind != Token_CloseBrace && f->curr_token.kind != Token_EOF) { AstNode *spec = func(f, token); array_add(&specs, spec); expect_semicolon(f, spec); } - close = expect_token(f, Token_CloseParen); + close = expect_token(f, Token_CloseBrace); if (f->curr_token.pos.line == close.pos.line || open.pos.line == close.pos.line) { expect_semicolon(f, NULL); |