2019-01-10 04:18:37 +03:00
|
|
|
package ast
|
|
|
|
|
2019-01-11 12:16:34 +03:00
|
|
|
import "github.com/d5/tengo/source"
|
2019-01-10 04:18:37 +03:00
|
|
|
|
|
|
|
type UndefinedLit struct {
|
2019-01-11 12:16:34 +03:00
|
|
|
TokenPos source.Pos
|
2019-01-10 04:18:37 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (e *UndefinedLit) exprNode() {}
|
|
|
|
|
2019-01-11 12:16:34 +03:00
|
|
|
func (e *UndefinedLit) Pos() source.Pos {
|
2019-01-10 04:18:37 +03:00
|
|
|
return e.TokenPos
|
|
|
|
}
|
|
|
|
|
2019-01-11 12:16:34 +03:00
|
|
|
func (e *UndefinedLit) End() source.Pos {
|
2019-01-10 04:18:37 +03:00
|
|
|
return e.TokenPos + 9 // len(undefined) == 9
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *UndefinedLit) String() string {
|
|
|
|
return "undefined"
|
|
|
|
}
|