mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 08:55:11 +01:00
Add a writer1.slice method.
This commit is contained in:
1 parent
519ec373f2
commit
18e32d61e5
10 files changed
+115
-24
No files matched your search
@@ -134,6 +134,16 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, rp replacementPolicy, pp pare
|
||||
}
|
||||
return nil
|
||||
}
|
||||
if isInDst(g.tm, n, t.KeySlice, 0) {
|
||||
if pp == parenthesesMandatory {
|
||||
b.writeb('(')
|
||||
}
|
||||
b.writes("(puffs_base_slice_u8){.ptr= a_dst.buf->ptr, .len=b_wptr_dst - a_dst.buf->ptr}")
|
||||
if pp == parenthesesMandatory {
|
||||
b.writeb(')')
|
||||
}
|
||||
return nil
|
||||
}
|
||||
// TODO.
|
||||
|
||||
case t.KeyOpenBracket:
|
||||
|
||||
Reference in new issue
Block a user