github.com/lwq2015/gopher-lua@v0.0.1/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 (self *Node) Line() int {
    16  	return self.line
    17  }
    18  
    19  func (self *Node) SetLine(line int) {
    20  	self.line = line
    21  }
    22  
    23  func (self *Node) LastLine() int {
    24  	return self.lastline
    25  }
    26  
    27  func (self *Node) SetLastLine(line int) {
    28  	self.lastline = line
    29  }