mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 00:47:28 +01:00
Add FlagsCallImpure and FlagsCallSuspendible.
This commit is contained in:
1 parent
a6e8ff5736
commit
da133c02ce
5 files changed
+44
-26
No files matched your search
@@ -445,7 +445,7 @@ 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.idMap, n.LHS().Expr()) && len(n.Args()) == 0 {
|
||||
if isInSrcReadU8(q.idMap, n.LHS().Expr()) && n.CallSuspendible() && len(n.Args()) == 0 {
|
||||
break
|
||||
}
|
||||
return nil, nil, fmt.Errorf("check: unrecognized token.Key (0x%X) for bcheckExprOther", n.ID0().Key())
|
||||
|
||||
+1
-1
@@ -294,7 +294,7 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
|
||||
case t.KeyOpenParen:
|
||||
// n is a function call.
|
||||
// TODO: delete this hack that only matches "in.src.read_u8?()".
|
||||
if isInSrcReadU8(q.idMap, n.LHS().Expr()) && len(n.Args()) == 0 {
|
||||
if isInSrcReadU8(q.idMap, n.LHS().Expr()) && n.CallSuspendible() && len(n.Args()) == 0 {
|
||||
if err := q.tcheckExpr(n.LHS().Expr(), depth); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user