Reordered counters
This commit is contained in:
parent
1bf288b8fd
commit
c925fe69b3
4 changed files with 11 additions and 8 deletions
|
@ -11,8 +11,8 @@ import (
|
|||
func (f *Function) CompileCondition(condition *expression.Expression, successLabel string, failLabel string) error {
|
||||
switch condition.Token.Text() {
|
||||
case "||":
|
||||
leftFailLabel := fmt.Sprintf("%s_false_%d", f.Name, f.count.subBranch)
|
||||
f.count.subBranch++
|
||||
leftFailLabel := fmt.Sprintf("%s_false_%d", f.Name, f.count.subBranch)
|
||||
|
||||
// Left
|
||||
left := condition.Children[0]
|
||||
|
@ -38,8 +38,8 @@ func (f *Function) CompileCondition(condition *expression.Expression, successLab
|
|||
return err
|
||||
|
||||
case "&&":
|
||||
leftSuccessLabel := fmt.Sprintf("%s_true_%d", f.Name, f.count.subBranch)
|
||||
f.count.subBranch++
|
||||
leftSuccessLabel := fmt.Sprintf("%s_true_%d", f.Name, f.count.subBranch)
|
||||
|
||||
// Left
|
||||
left := condition.Children[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue