xgo/ast/bool_lit.go

24 lines
369 B
Go
Raw Normal View History

2019-01-09 10:17:42 +03:00
package ast
import "github.com/d5/tengo/source"
2019-01-09 10:17:42 +03:00
type BoolLit struct {
Value bool
ValuePos source.Pos
2019-01-09 10:17:42 +03:00
Literal string
}
func (e *BoolLit) exprNode() {}
func (e *BoolLit) Pos() source.Pos {
2019-01-09 10:17:42 +03:00
return e.ValuePos
}
func (e *BoolLit) End() source.Pos {
return source.Pos(int(e.ValuePos) + len(e.Literal))
2019-01-09 10:17:42 +03:00
}
func (e *BoolLit) String() string {
return e.Literal
}