.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.1.1-0.20210319172145-bda8f5cee399 / go / ast / astutil / util.go
1 // Copyright 2015 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 package astutil
6
7 import "go/ast"
8
9 // Unparen returns e with any enclosing parentheses stripped.
10 func Unparen(e ast.Expr) ast.Expr {
11         for {
12                 p, ok := e.(*ast.ParenExpr)
13                 if !ok {
14                         return e
15                 }
16                 e = p.X
17         }
18 }