From 710eefe85a976c438da255499fbefd1a6c989ef6 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 9 Jul 2018 20:47:07 +0200 Subject: 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. --- pkg/ast/clone.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/ast/clone.go') 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, } -- cgit mrf-deployment