ast.go 395 B

1234567891011121314151617181920212223242526272829
  1. package ast
  2. type PositionHolder interface {
  3. Line() int
  4. SetLine(int)
  5. LastLine() int
  6. SetLastLine(int)
  7. }
  8. type Node struct {
  9. line int
  10. lastline int
  11. }
  12. func (self *Node) Line() int {
  13. return self.line
  14. }
  15. func (self *Node) SetLine(line int) {
  16. self.line = line
  17. }
  18. func (self *Node) LastLine() int {
  19. return self.lastline
  20. }
  21. func (self *Node) SetLastLine(line int) {
  22. self.lastline = line
  23. }