diff options
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/hoc/hoc.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/hoc/hoc.y b/src/cmd/hoc/hoc.y index 9c5a02f1..f634e82d 100644 --- a/src/cmd/hoc/hoc.y +++ b/src/cmd/hoc/hoc.y @@ -215,8 +215,8 @@ yylex(void) /* hoc6 */ return STRING; } switch (c) { - case '+': return follow('+', INC, follow('=', ADDEQ, '+')); - case '-': return follow('-', DEC, follow('=', SUBEQ, '-')); + case '+': return follow('+', INC, '+') == INC ? INC : follow('=', ADDEQ, '+'); + case '-': return follow('-', DEC, '-') == DEC ? DEC : follow('=', SUBEQ, '-'); case '*': return follow('=', MULEQ, '*'); case '/': return follow('=', DIVEQ, '/'); case '%': return follow('=', MODEQ, '%'); |