aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/ast
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/ast')
-rw-r--r--pkg/ast/ast.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/ast/ast.go b/pkg/ast/ast.go
index 2e8a7a015..2458c1245 100644
--- a/pkg/ast/ast.go
+++ b/pkg/ast/ast.go
@@ -30,6 +30,7 @@ type Node interface {
type Flags[T FlagValue] interface {
SetValues(values []T)
GetValues() []T
+ GetPos() Pos
}
type FlagValue interface {
@@ -152,6 +153,10 @@ func (n *IntFlags) GetValues() []*Int {
return n.Values
}
+func (n *IntFlags) GetPos() Pos {
+ return n.Pos
+}
+
type StrFlags struct {
Pos Pos
Name *Ident
@@ -170,6 +175,10 @@ func (n *StrFlags) GetValues() []*String {
return n.Values
}
+func (n *StrFlags) GetPos() Pos {
+ return n.Pos
+}
+
type TypeDef struct {
Pos Pos
Name *Ident