mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 08:47:28 +01:00
Generate placeholder code for "mark in.dst".
This commit is contained in:
1 parent
bcc7171b5a
commit
ac793d33bc
9 files changed
+63
-1
No files matched your search
@@ -241,6 +241,10 @@ func (q *checker) bcheckStatement(n *a.Node) error {
|
||||
_, _, err := q.bcheckExpr(n.Expr(), 0)
|
||||
return err
|
||||
|
||||
case a.KIO:
|
||||
_, _, err := q.bcheckExpr(n.IO().Value(), 0)
|
||||
return err
|
||||
|
||||
case a.KIf:
|
||||
return q.bcheckIf(n.If())
|
||||
|
||||
|
||||
@@ -84,6 +84,18 @@ func (q *checker) tcheckStatement(n *a.Node) error {
|
||||
case a.KExpr:
|
||||
return q.tcheckExpr(n.Expr(), 0)
|
||||
|
||||
case a.KIO:
|
||||
n := n.IO()
|
||||
val := n.Value()
|
||||
if err := q.tcheckExpr(val, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
typ := val.MType()
|
||||
if key := typ.Name().Key(); typ.Decorator() != 0 || (key != t.KeyReader1 && key != t.KeyWriter1) {
|
||||
return fmt.Errorf("check: %s expression %q, of type %q, does not have an I/O type",
|
||||
n.Keyword().String(q.tm), val.String(q.tm), typ.String(q.tm))
|
||||
}
|
||||
|
||||
case a.KIf:
|
||||
for n := n.If(); n != nil; n = n.ElseIf() {
|
||||
cond := n.Condition()
|
||||
|
||||
Reference in new issue
Block a user