mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 16:47:28 +01:00
Rename mark to set_mark, part 1 of N
This commit is contained in:
1 parent
4afd7de09f
commit
bd12c54ab5
9 files changed
+15
-13
No files matched your search
@@ -167,7 +167,7 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, rp replacementPolicy, pp pare
|
||||
// TODO: update the bPrefix variables?
|
||||
return nil
|
||||
}
|
||||
if isInSrc(g.tm, n, t.IDMark, 0) {
|
||||
if isInSrc(g.tm, n, t.IDSetMark, 0) {
|
||||
b.printf("wuffs_base__io_reader__mark(&%ssrc, %srptr_src)", aPrefix, bPrefix)
|
||||
return nil
|
||||
}
|
||||
@@ -178,7 +178,7 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, rp replacementPolicy, pp pare
|
||||
aPrefix, bPrefix, aPrefix)
|
||||
return nil
|
||||
}
|
||||
if isInDst(g.tm, n, t.IDMark, 0) {
|
||||
if isInDst(g.tm, n, t.IDSetMark, 0) {
|
||||
// TODO: is a private_impl.bounds[0] the right representation? What
|
||||
// if the function is passed a (ptr io_writer) instead of a
|
||||
// (io_writer)? Do we still want to have that mark live outside of
|
||||
|
||||
@@ -875,7 +875,7 @@ func (g *gen) writeReadUXX(b *buffer, n *a.Expr, name string, size uint32, endia
|
||||
|
||||
func isInSrc(tm *t.Map, n *a.Expr, methodName t.ID, nArgs int) bool {
|
||||
callSuspendible := methodName != t.IDSinceMark &&
|
||||
methodName != t.IDMark &&
|
||||
methodName != t.IDSetMark &&
|
||||
methodName != t.IDSetLimit
|
||||
if n.Operator() != t.IDOpenParen || n.CallSuspendible() != callSuspendible || len(n.Args()) != nArgs {
|
||||
return false
|
||||
@@ -898,7 +898,7 @@ func isInDst(tm *t.Map, n *a.Expr, methodName t.ID, nArgs int) bool {
|
||||
methodName != t.IDCopyFromSlice32 &&
|
||||
methodName != t.IDCopyFromSlice &&
|
||||
methodName != t.IDSinceMark &&
|
||||
methodName != t.IDMark
|
||||
methodName != t.IDSetMark
|
||||
// TODO: check that n.Args() is "(x:bar)".
|
||||
if n.Operator() != t.IDOpenParen || n.CallSuspendible() != callSuspendible || len(n.Args()) != nArgs {
|
||||
return false
|
||||
|
||||
Reference in new issue
Block a user