xgo/ast/selector_expr.go

23 lines
361 B
Go
Raw Normal View History

2019-01-09 10:17:42 +03:00
package ast
import "github.com/d5/tengo/source"
2019-01-09 10:17:42 +03:00
type SelectorExpr struct {
Expr Expr
Sel Expr
}
func (e *SelectorExpr) exprNode() {}
func (e *SelectorExpr) Pos() source.Pos {
2019-01-09 10:17:42 +03:00
return e.Expr.Pos()
}
func (e *SelectorExpr) End() source.Pos {
2019-01-09 10:17:42 +03:00
return e.Sel.End()
}
func (e *SelectorExpr) String() string {
return e.Expr.String() + "." + e.Sel.String()
}