xgo/ast/map_element_lit.go
2019-01-08 23:17:42 -08:00

24 lines
414 B
Go

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