xgo/ast/undefined_lit.go
2019-01-11 01:16:34 -08:00

21 lines
357 B
Go

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"
}