diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-07-09 20:47:07 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-07-09 20:47:07 +0200 |
| commit | 710eefe85a976c438da255499fbefd1a6c989ef6 (patch) | |
| tree | 3467ac95a3c574bdf41105e012df2e4c540ed859 /pkg/ast/clone.go | |
| parent | f25e57704183544b0d540ef0035acfa6fb9071d7 (diff) | |
pkg/compiler: support negative integers
Currently we have to use 0xffffffffffffffff to represent -1,
and we can't express e.g. -20:20 int range.
Support negative consts to fix both problems.
Diffstat (limited to 'pkg/ast/clone.go')
| -rw-r--r-- | pkg/ast/clone.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/ast/clone.go b/pkg/ast/clone.go index 9ccc3ea76..072425115 100644 --- a/pkg/ast/clone.go +++ b/pkg/ast/clone.go @@ -165,7 +165,7 @@ func (n *Int) Clone() Node { return &Int{ Pos: n.Pos, Value: n.Value, - valueFmt: n.valueFmt, + ValueFmt: n.ValueFmt, Ident: n.Ident, CExpr: n.CExpr, } @@ -179,14 +179,14 @@ func (n *Type) Clone() Node { return &Type{ Pos: n.Pos, Value: n.Value, - valueFmt: n.valueFmt, + ValueFmt: n.ValueFmt, Ident: n.Ident, String: n.String, HasString: n.HasString, HasColon: n.HasColon, Pos2: n.Pos2, Value2: n.Value2, - value2Fmt: n.value2Fmt, + Value2Fmt: n.Value2Fmt, Ident2: n.Ident2, Args: args, } |
