summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-12-30 19:31:29 -0500
committerJune McEnroe <june@causal.agency>2020-12-30 19:31:29 -0500
commit0566f40843136ae245e3eec886efb30df91275a1 (patch)
tree58c8785f870ad4326d65674a97b1de06daac10f5 /bin
parentAdd postfix $ operator to bit (diff)
downloadsrc-0566f40843136ae245e3eec886efb30df91275a1.tar.gz
src-0566f40843136ae245e3eec886efb30df91275a1.zip
Support unary + in order
Missed this because operator(7) just doesn't list it, oddly.
Diffstat (limited to '')
-rw-r--r--bin/order.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/order.y b/bin/order.y
index b798e634..d778eefc 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); }