let foo = 1.23456
const bar = if(foo > 6.54321) // this comment results in a parsing error
1.0
else
-1.0
Result:
Rebooted in 00:00:00.0486655
ERROR: [plonk\test.to2(28, 37)] Parsing
plonk\test.to2(28, 37): Expected '(' or <identifier> or 'if' or <identifier> or '-' or '!' or '~' or <identifier> or <identifier> or <float> or <integer> or <string> or '(' or '{' or '[' or '(' or '(' or Expected at least 1 items or 'fn' or 'return' or 'break' or 'continue'
Expected:
No error
Removing the comment results in working code:
let foo = 1.23456
const bar = if(foo > 6.54321)
1.0
else
-1.0
Result: works fine
Use of curly braces works, too:
let foo = 1.23456
const bar = if(foo > 6.54321) { // this is a fine comment
1.0
} else {
-1.0
}
KSP 0.1.2.022258 KS2 0.4.1
Code to reproduce:
Result:
Expected: No error
Removing the comment results in working code:
Result: works fine
Use of curly braces works, too:
Result: works fine
Maybe related to issue #57?