Nivekk / KOS

Fully programmable autopilot mod for KSP.
Other
80 stars 30 forks source link

(v0.85) Fails to parse a parenthesized expression spanning multiple lines. #165

Open Dunbaratu opened 10 years ago

Dunbaratu commented 10 years ago

Some of my scripts that used to work correctly in 0.71 now fail to parse in 0.85 and I've narrowed down the problem to this error in the parser:

This example expression parses fine:

set x to (   ( 100 - 50 )  / ( 30 - 10 ) * 1.01   ).

While this one generates a syntax error:

set x to (
  ( 100 - 50 )  / ( 30 - 10 ) * 1.01
  ).

They are identical except for the fact that the second one has some of the whitespace in the form of end-of-lines instead of in the form of spaces.

The problem seems to be that a closing parenthesis must appear on the same line as its matching opening parenthesis. At least that's what it seems like is the problem from my trial and error.