diff options
author | June McEnroe <june@causal.agency> | 2020-12-30 19:31:29 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-12-30 19:31:29 -0500 |
commit | 6de6cee0ac03a19cfc06c3ca1a0471ae710c38f2 (patch) | |
tree | b86cba794be527c7dc9ed19f7db2ce91f4f37de7 /bin | |
parent | Add postfix $ operator to bit (diff) | |
download | src-6de6cee0ac03a19cfc06c3ca1a0471ae710c38f2.tar.gz src-6de6cee0ac03a19cfc06c3ca1a0471ae710c38f2.zip |
Support unary + in order
Missed this because operator(7) just doesn't list it, oddly.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/order.y | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/order.y b/bin/order.y index 95f1036e..b4b40a34 100644 --- a/bin/order.y +++ b/bin/order.y @@ -82,6 +82,7 @@ expr: | Dec expr { $$ = fmt("(--%s)", $2); } | expr Inc { $$ = fmt("(%s++)", $1); } | expr Dec { $$ = fmt("(%s--)", $1); } + | '+' expr %prec '!' { $$ = fmt("(+%s)", $2); } | '-' expr %prec '!' { $$ = fmt("(-%s)", $2); } | '*' expr %prec '!' { $$ = fmt("(*%s)", $2); } | '&' expr %prec '!' { $$ = fmt("(&%s)", $2); } |