diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-05-10 18:02:54 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-05-14 19:28:01 +0200 |
| commit | eea28fee309680462752ef7709f1a94178dce44d (patch) | |
| tree | 29caff3a1e370c092522a94a9a231d83a767d20b /pkg/ast/testdata | |
| parent | 1886b2a4811a4d9adbfc509505a095848cc655eb (diff) | |
pkg/compiler: support complex len targets
This change adds compiler support for complex path
expressions in len targets. E.g. it allows to refer
to a sibling field as len[parent_struct:field:another_field].
See the docs change for details.
This is just a compiler change.
The feature is not yet supported by the prog package.
Diffstat (limited to 'pkg/ast/testdata')
| -rw-r--r-- | pkg/ast/testdata/all.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/ast/testdata/all.txt b/pkg/ast/testdata/all.txt index e5a1839dd..392796254 100644 --- a/pkg/ast/testdata/all.txt +++ b/pkg/ast/testdata/all.txt @@ -22,11 +22,12 @@ str_flags4 = "string", 42 ### unexpected int, expecting string call(foo ,int32 , bar int32) ### unexpected ',', expecting int, identifier, string call(foo int32:"bar") ### unexpected string, expecting int, identifier +call(a int32, b len[a:"bar"]) ### unexpected string, expecting int, identifier define FOO `bar` define FOO `bar ### C expression is not terminated -foo(x int32[1:2:3, opt]) ### unexpected ':', expecting ']' +foo(x int32[1:2:3, opt]) foo2(x int32[1[2]:2]) ### unexpected ':', expecting ']' s0 { |
