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

24 lines
409 B
Go

package ast
import "github.com/d5/tengo/source"
type MapElementLit struct {
Key string
KeyPos source.Pos
ColonPos source.Pos
Value Expr
}
func (e *MapElementLit) exprNode() {}
func (e *MapElementLit) Pos() source.Pos {
return e.KeyPos
}
func (e *MapElementLit) End() source.Pos {
return e.Value.End()
}
func (e *MapElementLit) String() string {
return e.Key + ": " + e.Value.String()
}