Commit f8a3b0e7 authored by Han Young's avatar Han Young
Browse files

accept leading + and - as valid factor

parent c7709ef3
......@@ -121,7 +121,9 @@ factor: "(" exp ")" { $$ = $2; }
| "(" exp { $$ = $2; }
| "number"
| "-" "number" { $$ = -$2; }
| "-"
| "+" "number" { $$ = $2; }
| "+"
| factor "%" { $$ = $1 / KNumber(100); }
;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment