Skip to content

Commit

Permalink
Add prefix - expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Evans committed Oct 7, 2024
1 parent 6c0a54b commit ac92326
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bootstrap/src/hmc/Grammar.hmh
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ include hocc
# Punctuation.
token TILDE "~" of token_simple prec pTilde
token QMARK "?" of token_simple prec pTilde
token MINUS "-" of token_simple # Precedence depends on prefix/infix.
token MINUS "-" of token_simple prec pPlusOp
token LT "<" of token_simple prec pEqOp
token LT_EQ "<=" of token_simple prec pEqOp
token EQ "=" of token_simple prec pEqOp
Expand Down Expand Up @@ -579,6 +579,7 @@ include hocc
| "{" Expr "with" Field FieldListTl "}"
| Expr Arguments prec pExpr_Expr_Arguments
| PrefixOp Expr prec pExpr_PrefixOp_Expr
| "-" Expr prec pTilde
-> Xxx

nonterm Exprs of xxx prec pComma ::=
Expand Down

0 comments on commit ac92326

Please sign in to comment.