Nivekk / KOS

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

0.8, broke the parsing of curly brace sections spanning multiple lines. #117

Closed Dunbaratu closed 11 years ago

Dunbaratu commented 11 years ago

Both of the following parse correctly:

if x < 2 { print "x is less than 2". }.
until x < 2 { print "x is sill not less than 2". }.

But both of the following fail:

if x < 2 {
  print "x is less than 2".
}.
until x < 2 { 
  print "x is sill not less than 2". 
}.

It claims there's a mismatched delimiter when they span more than one line.

Dunbaratu commented 11 years ago

(This is a more general case of issue #115.)

xZise commented 11 years ago

Yeah the parser try to find always the matching closing bracket in the same line since a06c0e589d2fb417223bcc9db5feb9a524aff47b. It needs a logic which allows the closing curly brackets in another line.