mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 08:55:11 +01:00
Simplify tcheckExpr
This commit is contained in:
1 parent
e00e71da7b
commit
a5b4838e8c
1 file changed
+4
-14
+4
-14
@@ -373,23 +373,13 @@ func (q *checker) tcheckExpr(n *a.Expr, depth uint32) error {
|
|||||||
|
|
||||||
switch op := n.Operator(); {
|
switch op := n.Operator(); {
|
||||||
case op.IsXUnaryOp():
|
case op.IsXUnaryOp():
|
||||||
if err := q.tcheckExprUnaryOp(n, depth); err != nil {
|
return q.tcheckExprUnaryOp(n, depth)
|
||||||
return err
|
|
||||||
}
|
|
||||||
case op.IsXBinaryOp():
|
case op.IsXBinaryOp():
|
||||||
if err := q.tcheckExprBinaryOp(n, depth); err != nil {
|
return q.tcheckExprBinaryOp(n, depth)
|
||||||
return err
|
|
||||||
}
|
|
||||||
case op.IsXAssociativeOp():
|
case op.IsXAssociativeOp():
|
||||||
if err := q.tcheckExprAssociativeOp(n, depth); err != nil {
|
return q.tcheckExprAssociativeOp(n, depth)
|
||||||
return err
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
if err := q.tcheckExprOther(n, depth); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return nil
|
return q.tcheckExprOther(n, depth)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
|
func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
|
||||||
|
|||||||
Reference in new issue
Block a user