Skip to content

Commit

Permalink
Remove unnecessary parser complexity
Browse files Browse the repository at this point in the history
This `!"="` is necessary for general macro calls, to prevent
accidentally considering `foo != bar` as if it were a macro call going
`foo! =` and then getting confused. However, both the `calc` and `seq`
macros explicitly check for the curly braces, so don't actually need the
negative forward lookahead.
  • Loading branch information
jaybosamiya committed May 29, 2024
1 parent a41841c commit fd24517
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/verus.pest
Original file line number Diff line number Diff line change
Expand Up @@ -498,12 +498,12 @@ calc_macro_body = {
}

calc_macro_call = {
attr* ~ calc_str ~ bang_str ~ !"=" ~
attr* ~ calc_str ~ bang_str ~
calc_macro_body
}

seq_macro_call = {
attr* ~ seq_str ~ bang_str ~ !"=" ~
attr* ~ seq_str ~ bang_str ~
lbracket_str ~ comma_delimited_exprs? ~ rbracket_str
}

Expand Down

0 comments on commit fd24517

Please sign in to comment.