Add a (table T).row method

This commit is contained in:
Nigel Tao committed 2018-05-26 11:32:54 +10:00
1 parent 00c3f7ef1e
commit f43afd8236
6 files changed
+38 -8

No files matched your search

+9
View File
@@ -332,6 +332,15 @@ func (g *gen) writeBuiltinTable(b *buffer, recv *a.Expr, method t.ID, args []*a.
}
b.writeb(')')
return nil
case t.IDRow:
// TODO: don't assume that the table is a table of base.u8.
b.writes("wuffs_base__table_u8__row(")
if err := g.writeExpr(b, recv, rp, depth); err != nil {
return err
}
b.writeb(',')
return g.writeArgs(b, args, rp, depth)
}
if field != "" {