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

23 lines
366 B
Go

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