stmt/if: fix generated else on newline causing parse error
This commit is contained in:
parent
e82a4bb1c4
commit
72b8da5e4a
2
node.go
2
node.go
@ -756,6 +756,7 @@ func (this *conversionState) convertNoFreeFloating(n_ node.Node) (string, error)
|
||||
return "", parseErr{n, err}
|
||||
}
|
||||
|
||||
ret = strings.TrimRight(ret, "\n")
|
||||
ret += " else if " + cond + body
|
||||
}
|
||||
|
||||
@ -770,6 +771,7 @@ func (this *conversionState) convertNoFreeFloating(n_ node.Node) (string, error)
|
||||
return "", parseErr{n, err}
|
||||
}
|
||||
|
||||
ret = strings.TrimRight(ret, "\n")
|
||||
ret += " else " + body
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user