]> Cypherpunks repositories - gostls13.git/commitdiff
go/parser: remove unused method checkBinaryExpr
authorRobert Griesemer <gri@golang.org>
Thu, 16 Jun 2022 18:10:54 +0000 (11:10 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 16 Jun 2022 18:25:05 +0000 (18:25 +0000)
Change-Id: Ica981657e50e30cbfa1757e8457819a479f11c7d
Reviewed-on: https://go-review.googlesource.com/c/go/+/412775
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
src/go/parser/parser.go

index 18041ff808d1e61a21af5c2d161c820924223379..ca2f24c8b8cd5b959bee3272f05196d73e8b7b89 100644 (file)
@@ -1821,23 +1821,6 @@ func (p *parser) parseBinaryExpr(x ast.Expr, prec1 int, check bool) ast.Expr {
        }
 }
 
-// checkBinaryExpr checks binary expressions that were not already checked by
-// parseBinaryExpr, because the latter was called with check=false.
-func (p *parser) checkBinaryExpr(x ast.Expr) {
-       bx, ok := x.(*ast.BinaryExpr)
-       if !ok {
-               return
-       }
-
-       bx.X = p.checkExpr(bx.X)
-       bx.Y = p.checkExpr(bx.Y)
-
-       // parseBinaryExpr checks x and y for each binary expr in a tree, so we
-       // traverse the tree of binary exprs starting from x.
-       p.checkBinaryExpr(bx.X)
-       p.checkBinaryExpr(bx.Y)
-}
-
 // The result may be a type or even a raw type ([...]int). Callers must
 // check the result (using checkExpr or checkExprOrType), depending on
 // context.