mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 08:52:18 +01:00
Remove obsolete writeStatementAssign lhsIdent arg
This commit is contained in:
1 parent
23cd084b53
commit
e811b2dd75
1 file changed
+4
-6
@@ -70,9 +70,9 @@ func (g *gen) writeStatement(b *buffer, n *a.Node, depth uint32) error {
|
|||||||
switch n.Kind() {
|
switch n.Kind() {
|
||||||
case a.KAssign:
|
case a.KAssign:
|
||||||
n := n.AsAssign()
|
n := n.AsAssign()
|
||||||
return g.writeStatementAssign(b, 0, n.LHS(), n.LHS().MType(), n.Operator(), n.RHS(), depth)
|
return g.writeStatementAssign(b, n.LHS(), n.LHS().MType(), n.Operator(), n.RHS(), depth)
|
||||||
case a.KExpr:
|
case a.KExpr:
|
||||||
return g.writeStatementAssign(b, 0, nil, nil, 0, n.AsExpr(), depth)
|
return g.writeStatementAssign(b, nil, nil, 0, n.AsExpr(), depth)
|
||||||
case a.KIOBind:
|
case a.KIOBind:
|
||||||
return g.writeStatementIOBind(b, n.AsIOBind(), depth)
|
return g.writeStatementIOBind(b, n.AsIOBind(), depth)
|
||||||
case a.KIf:
|
case a.KIf:
|
||||||
@@ -92,7 +92,7 @@ func (g *gen) writeStatement(b *buffer, n *a.Node, depth uint32) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *gen) writeStatementAssign(b *buffer,
|
func (g *gen) writeStatementAssign(b *buffer,
|
||||||
lhsIdent t.ID, lhsExpr *a.Expr, lTyp *a.TypeExpr,
|
lhsExpr *a.Expr, lTyp *a.TypeExpr,
|
||||||
op t.ID, rhsExpr *a.Expr, depth uint32) error {
|
op t.ID, rhsExpr *a.Expr, depth uint32) error {
|
||||||
|
|
||||||
// TODO: clean this method body up.
|
// TODO: clean this method body up.
|
||||||
@@ -114,9 +114,7 @@ func (g *gen) writeStatementAssign(b *buffer,
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
lhs := buffer(nil)
|
lhs := buffer(nil)
|
||||||
if lhsIdent != 0 {
|
if err := g.writeExpr(&lhs, lhsExpr, depth); err != nil {
|
||||||
lhs.printf("%s%s", vPrefix, lhsIdent.Str(g.tm))
|
|
||||||
} else if err := g.writeExpr(&lhs, lhsExpr, depth); err != nil {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user