Fix incorrect check in macro arguments.

This commit is contained in:
Christoffer Lerno
2021-12-04 01:08:16 +01:00
parent eb81c00ada
commit a9c2e59f60
2 changed files with 7 additions and 1 deletions

View File

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

View File

@@ -0,0 +1,6 @@
macro void hello($b$Bar x; // #error: Expected ')'
@hello(1);
var $foo = 1;
$foo;
FOO;
}