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/testdata/all.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/ast/testdata') diff --git a/pkg/ast/testdata/all.txt b/pkg/ast/testdata/all.txt index 6c818eca6..6e4e72d2c 100644 --- a/pkg/ast/testdata/all.txt +++ b/pkg/ast/testdata/all.txt @@ -12,6 +12,7 @@ int_flags = 0, "foo" ### unexpected string, expecting int, identifier int_flags2 = ' ### char literal is not terminated int_flags3 = 'a ### char literal is not terminated int_flags3 = 'a, 1 ### char literal is not terminated +int_flags4 = 1, -2- ### bad integer "-2-" str_flags0 = "foo", "bar" str_flags1 = "non terminated ### string literal is not terminated -- cgit mrf-deployment