mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Fix incorrect check in macro arguments.
This commit is contained in:
@@ -1466,7 +1466,7 @@ static bool parse_macro_arguments(Context *context, Visibility visibility, Decl
|
||||
}
|
||||
// TODO use the body param.
|
||||
}
|
||||
TRY_CONSUME(TOKEN_RPAREN, false);
|
||||
CONSUME_OR(TOKEN_RPAREN, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
6
test/test_suite/regression/crash_on_right_paren_macro.c3
Normal file
6
test/test_suite/regression/crash_on_right_paren_macro.c3
Normal file
@@ -0,0 +1,6 @@
|
||||
macro void hello($b$Bar x; // #error: Expected ')'
|
||||
@hello(1);
|
||||
var $foo = 1;
|
||||
$foo;
|
||||
FOO;
|
||||
}
|
||||
Reference in New Issue
Block a user