mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
Refactor isInSrcReadU8 and isLowBits.
This commit is contained in:
1 parent
711adf5273
commit
c1dff0ca41
3 files changed
+22
-6
No files matched your search
@@ -590,11 +590,11 @@ func (q *checker) bcheckExprOther(n *a.Expr, depth uint32) (*big.Int, *big.Int,
|
||||
|
||||
case t.KeyOpenParen:
|
||||
// TODO: delete this hack that only matches "in.src.read_u8?()".
|
||||
if isInSrcReadU8(q.tm, n.LHS().Expr()) && n.CallSuspendible() && len(n.Args()) == 0 {
|
||||
if isInSrcReadU8(q.tm, n) {
|
||||
break
|
||||
}
|
||||
// TODO: delete this hack that only matches "foo.low_bits(etc)".
|
||||
if isLowBits(q.tm, n.LHS().Expr()) && !n.CallImpure() && len(n.Args()) == 1 {
|
||||
if isLowBits(q.tm, n) {
|
||||
a := n.Args()[0].Arg().Value()
|
||||
aMin, aMax, err := q.bcheckExpr(a, depth)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user