1
0
mirror of https://github.com/golang/go synced 2024-11-20 03:14:43 -07:00

6a, 8a: allow $(-1) for consistency with $1, $(1), $-1.

R=ken2
CC=golang-dev
https://golang.org/cl/5373074
This commit is contained in:
Russ Cox 2011-11-11 14:56:49 -05:00
parent 351daf8788
commit 6d9c02aea3
2 changed files with 12 additions and 0 deletions

View File

@ -429,6 +429,12 @@ imm:
$$.type = D_FCONST;
$$.dval = $3;
}
| '$' '(' '-' LFCONST ')'
{
$$ = nullgen;
$$.type = D_FCONST;
$$.dval = -$4;
}
| '$' '-' LFCONST
{
$$ = nullgen;

View File

@ -392,6 +392,12 @@ imm:
$$.type = D_FCONST;
$$.dval = $3;
}
| '$' '(' '-' LFCONST ')'
{
$$ = nullgen;
$$.type = D_FCONST;
$$.dval = -$4;
}
| '$' '-' LFCONST
{
$$ = nullgen;