Skip to content

Commit

Permalink
Make macros syntax error instead of silently failing. Thanks @marcioA…
Browse files Browse the repository at this point in the history
  • Loading branch information
ircmaxell committed Apr 26, 2019
1 parent 943683b commit 7b2913e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/macros.yay
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

$(macro) {
declare {
$! // syntax error if no match
$(repeat(either(
chain(
optional(buffer('static') as static),
Expand Down Expand Up @@ -112,7 +113,7 @@ $(macro) {

$(macro) {
compile {
function $(llvmidentifier() as name) ($(optional(ls(
function $(llvmidentifier() as name) $! ($(optional(ls(
T_VARIABLE as param,
token(',')
)) as params)) {
Expand All @@ -134,6 +135,7 @@ $(macro) {

$(macro :unsafe :recursive) {
$(optional(buffer('unsigned')) as unsigned) compile {
$!
$(repeat(either(
chain(T_VARIABLE as result, token('='), either(
chain(T_VARIABLE as nullcheck_var, token(T_IS_EQUAL), buffer('null')) as nullcheck,
Expand Down

0 comments on commit 7b2913e

Please sign in to comment.