github.com/llvm-mirror/llgo@v0.0.0-20190322182713-bf6f0a60fce1/third_party/gotools/go/ast/astutil/util.go (about) 1 package astutil 2 3 import "go/ast" 4 5 // Unparen returns e with any enclosing parentheses stripped. 6 func Unparen(e ast.Expr) ast.Expr { 7 for { 8 p, ok := e.(*ast.ParenExpr) 9 if !ok { 10 return e 11 } 12 e = p.X 13 } 14 }