mirror of
https://github.com/golang/go
synced 2024-11-02 13:42:29 +00:00
go/parser: remove unused method checkBinaryExpr
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>
This commit is contained in:
parent
74f1fa6ecb
commit
32510eea74
1 changed files with 0 additions and 17 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue