xgo/ast/undefined_lit.go

22 lines
357 B
Go
Raw Normal View History

package ast
import "github.com/d5/tengo/source"
type UndefinedLit struct {
TokenPos source.Pos
}
func (e *UndefinedLit) exprNode() {}
func (e *UndefinedLit) Pos() source.Pos {
return e.TokenPos
}
func (e *UndefinedLit) End() source.Pos {
return e.TokenPos + 9 // len(undefined) == 9
}
func (e *UndefinedLit) String() string {
return "undefined"
}