From a3857c4e90fa4a3fbe78bd4b53cdc77aa91533cf Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 26 Aug 2017 21:36:08 +0200 Subject: pkg/compiler, sys/syz-sysgen: move const handling to pkg/compiler Now pkg/compiler deals with consts. --- pkg/ast/ast.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pkg/ast/ast.go') diff --git a/pkg/ast/ast.go b/pkg/ast/ast.go index e2ddc0224..b283ca5f8 100644 --- a/pkg/ast/ast.go +++ b/pkg/ast/ast.go @@ -12,6 +12,14 @@ type Pos struct { Col int // column number, starting at 1 (byte count) } +// Description contains top-level nodes of a parsed sys description. +type Description struct { + Nodes []Node +} + +// Node is AST node interface. +type Node interface{} + // Top-level AST nodes: type NewLine struct { @@ -50,6 +58,7 @@ type Call struct { Pos Pos Name *Ident CallName string + NR uint64 Args []*Field Ret *Type } @@ -104,6 +113,8 @@ type Type struct { Ident string String string // Part after COLON (for ranges and bitfields). + HasColon bool + Pos2 Pos Value2 uint64 Value2Hex bool Ident2 string -- cgit mrf-deployment