diff options
Diffstat (limited to 'src/cmd/compile/internal/syntax/nodes.go')
-rw-r--r-- | src/cmd/compile/internal/syntax/nodes.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/syntax/nodes.go b/src/cmd/compile/internal/syntax/nodes.go index 4e264c1e82..fee155c97c 100644 --- a/src/cmd/compile/internal/syntax/nodes.go +++ b/src/cmd/compile/internal/syntax/nodes.go @@ -8,6 +8,7 @@ package syntax // Nodes type Node interface { + Line() uint32 aNode() } @@ -19,6 +20,10 @@ type node struct { func (*node) aNode() {} +func (n *node) Line() uint32 { + return n.line +} + func (n *node) init(p *parser) { n.pos = uint32(p.pos) n.line = uint32(p.line) |