diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-04-29 10:56:48 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-04-29 12:04:22 +0200 |
| commit | 1e85f7b9af8e29f06a22eb1ff325de2a40072738 (patch) | |
| tree | fbbe16d0eb26f84ad22b82e0925420b1177798e2 /pkg/ast/testdata | |
| parent | c7f6891ca7dc623ed77840580cb9270c61d200ee (diff) | |
pkg/ast: support char constants
Frequently it's useful to do something like:
int8['a':'z']
punctuation = ',', '-', ':'
Diffstat (limited to 'pkg/ast/testdata')
| -rw-r--r-- | pkg/ast/testdata/all.txt | 3 |
1 files changed, 3 insertions, 0 deletions
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 |
