github.com/dfcfw/lua@v0.0.0-20230325031207-0cc7ffb7b8b9/ast/ast.go (about) 1 package ast 2 3 type PositionHolder interface { 4 Line() int 5 SetLine(int) 6 LastLine() int 7 SetLastLine(int) 8 } 9 10 type Node struct { 11 line int 12 lastline int 13 } 14 15 func (n *Node) Line() int { 16 return n.line 17 } 18 19 func (n *Node) SetLine(line int) { 20 n.line = line 21 } 22 23 func (n *Node) LastLine() int { 24 return n.lastline 25 } 26 27 func (n *Node) SetLastLine(line int) { 28 n.lastline = line 29 }