5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-25 15:41:37 +00:00
matterbridge/vendor/github.com/d5/tengo/compiler/ast/undefined_lit.go

25 lines
560 B
Go
Raw Normal View History

package ast
import "github.com/d5/tengo/compiler/source"
// UndefinedLit represents an undefined literal.
type UndefinedLit struct {
TokenPos source.Pos
}
func (e *UndefinedLit) exprNode() {}
// Pos returns the position of first character belonging to the node.
func (e *UndefinedLit) Pos() source.Pos {
return e.TokenPos
}
// End returns the position of first character immediately after the node.
func (e *UndefinedLit) End() source.Pos {
return e.TokenPos + 9 // len(undefined) == 9
}
func (e *UndefinedLit) String() string {
return "undefined"
}