mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 08:52:18 +01:00
Reorder ast.NewIf arguments
This commit is contained in:
1 parent
9a186b24fb
commit
3ea85e770b
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -594,7 +594,7 @@ func (n *If) ElseIf() *If { return n.rhs.If() }
|
|||||||
func (n *If) BodyIfTrue() []*Node { return n.list2 }
|
func (n *If) BodyIfTrue() []*Node { return n.list2 }
|
||||||
func (n *If) BodyIfFalse() []*Node { return n.list1 }
|
func (n *If) BodyIfFalse() []*Node { return n.list1 }
|
||||||
|
|
||||||
func NewIf(condition *Expr, elseIf *If, bodyIfTrue []*Node, bodyIfFalse []*Node) *If {
|
func NewIf(condition *Expr, bodyIfTrue []*Node, bodyIfFalse []*Node, elseIf *If) *If {
|
||||||
return &If{
|
return &If{
|
||||||
kind: KIf,
|
kind: KIf,
|
||||||
mhs: condition.Node(),
|
mhs: condition.Node(),
|
||||||
|
|||||||
+1
-1
@@ -721,7 +721,7 @@ func (p *parser) parseIf() (*a.If, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return a.NewIf(condition, elseIf, bodyIfTrue, bodyIfFalse), nil
|
return a.NewIf(condition, bodyIfTrue, bodyIfFalse, elseIf), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *parser) parseIterateNode() (*a.Node, error) {
|
func (p *parser) parseIterateNode() (*a.Node, error) {
|
||||||
|
|||||||
Reference in new issue
Block a user