mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 00:52:18 +01:00
Remove token ID/Key distinction, part 2 of N
This commit is contained in:
1 parent
afd7429e9a
commit
7007682182
6 files changed
+67
-61
No files matched your search
+7
-9
@@ -349,25 +349,23 @@ func (q *checker) tcheckExpr(n *a.Expr, depth uint32) error {
|
||||
}
|
||||
depth++
|
||||
|
||||
switch n.Operator().Flags() & (t.FlagsUnaryOp | t.FlagsBinaryOp | t.FlagsAssociativeOp) {
|
||||
case 0:
|
||||
if err := q.tcheckExprOther(n, depth); err != nil {
|
||||
return err
|
||||
}
|
||||
case t.FlagsUnaryOp:
|
||||
switch op := n.Operator(); {
|
||||
case op.IsXUnaryOp():
|
||||
if err := q.tcheckExprUnaryOp(n, depth); err != nil {
|
||||
return err
|
||||
}
|
||||
case t.FlagsBinaryOp:
|
||||
case op.IsXBinaryOp():
|
||||
if err := q.tcheckExprBinaryOp(n, depth); err != nil {
|
||||
return err
|
||||
}
|
||||
case t.FlagsAssociativeOp:
|
||||
case op.IsXAssociativeOp():
|
||||
if err := q.tcheckExprAssociativeOp(n, depth); err != nil {
|
||||
return err
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("check: unrecognized token.Key (0x%X) for tcheckExpr", n.Operator().Key())
|
||||
if err := q.tcheckExprOther(n, depth); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
n.Node().SetTypeChecked()
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user