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

23 lines
361 B
Go

package ast
import "github.com/d5/tengo/source"
type ParenExpr struct {
Expr Expr
LParen source.Pos
RParen source.Pos
}
func (e *ParenExpr) exprNode() {}
func (e *ParenExpr) Pos() source.Pos {
return e.LParen
}
func (e *ParenExpr) End() source.Pos {
return e.RParen + 1
}
func (e *ParenExpr) String() string {
return "(" + e.Expr.String() + ")"
}