diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-05-10 17:15:29 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-05-14 19:28:01 +0200 |
| commit | 1886b2a4811a4d9adbfc509505a095848cc655eb (patch) | |
| tree | 8ab666c6f9ea59912d911abd5639480eae534eda /pkg/ast/ast.go | |
| parent | 354b388e08761dabb99236aa73a24e9b861b6e5f (diff) | |
pkg/ast: refactor COLON handling
This prepared for handling of bytesize[parent:foo:bar] expressions
by allowing multiple identifiers after colon.
No functional changes for now, just preparation for storing more
than one identifier after colon.
Diffstat (limited to 'pkg/ast/ast.go')
| -rw-r--r-- | pkg/ast/ast.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/pkg/ast/ast.go b/pkg/ast/ast.go index 1e1e97221..b692f8633 100644 --- a/pkg/ast/ast.go +++ b/pkg/ast/ast.go @@ -199,13 +199,10 @@ type Type struct { Ident string String string HasString bool - // Part after COLON (for ranges and bitfields). - HasColon bool - Pos2 Pos - Value2 uint64 - Value2Fmt IntFmt - Ident2 string - Args []*Type + // Parts after COLON (for ranges and bitfields). + Colon []*Type + // Sub-types in []. + Args []*Type } func (n *Type) Info() (Pos, string, string) { |
