From 6a88dc322acfd54c55ed7dceebdeaa5ce18ce416 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Tue, 13 Jun 2017 15:04:23 +0100 Subject: Declaration grouping uses braces rather than parentheses --- src/parser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/parser.cpp') 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); -- cgit v1.2.3