mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 08:38:14 +01:00
Add an io_writer var to gif's decoder.decode_id
This commit is contained in:
1 parent
0f32650064
commit
2d3b3b1dae
7 files changed
+47
-15
No files matched your search
@@ -495,6 +495,8 @@ func NewField(name t.ID, xType *TypeExpr, defaultValue *Expr) *Field {
|
||||
// IOBind is "io_bind (in_fields) { List2 }":
|
||||
// - List0: <Expr> in.something fields
|
||||
// - List2: <Statement> body
|
||||
//
|
||||
// TODO: in_fields and "in.something" isn't right.
|
||||
type IOBind Node
|
||||
|
||||
func (n *IOBind) Node() *Node { return (*Node)(n) }
|
||||
@@ -705,6 +707,10 @@ func (n *TypeExpr) IsIdeal() bool {
|
||||
return n.id0 == 0 && n.id1 == t.IDBase && n.id2 == t.IDDoubleZ
|
||||
}
|
||||
|
||||
func (n *TypeExpr) IsIOType() bool {
|
||||
return n.id0 == 0 && n.id1 == t.IDBase && (n.id2 == t.IDIOReader || n.id2 == t.IDIOWriter)
|
||||
}
|
||||
|
||||
func (n *TypeExpr) IsNumType() bool {
|
||||
return n.id0 == 0 && n.id1 == t.IDBase && n.id2.IsNumType()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user