stmt/if: fix generated else on newline causing parse error

This commit is contained in:
mappu 2020-04-10 11:23:08 +12:00
parent e82a4bb1c4
commit 72b8da5e4a

View File

@ -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
}