xgo/compiler/ast/undefined_lit.go
2019-01-11 02:27:28 -08:00

21 lines
366 B
Go

package ast
import "github.com/d5/tengo/compiler/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"
}