From 1e85f7b9af8e29f06a22eb1ff325de2a40072738 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 29 Apr 2018 10:56:48 +0200 Subject: pkg/ast: support char constants Frequently it's useful to do something like: int8['a':'z'] punctuation = ',', '-', ':' --- pkg/ast/testdata/all.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/ast/testdata') diff --git a/pkg/ast/testdata/all.txt b/pkg/ast/testdata/all.txt index 7e1db7309..6c818eca6 100644 --- a/pkg/ast/testdata/all.txt +++ b/pkg/ast/testdata/all.txt @@ -9,6 +9,9 @@ int_flags0 = 0, 0x1, 0xab int_flags1 = 123ab0x ### bad integer "123ab0x" int_flags1 == 0, 1 ### unexpected '=', expecting int, identifier, string 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 str_flags0 = "foo", "bar" str_flags1 = "non terminated ### string literal is not terminated -- cgit mrf-deployment