mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-29 14:12:02 -08:00
25 lines
560 B
Go
25 lines
560 B
Go
|
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"
|
||
|
}
|