Closed JujuAdams closed 1 year ago
Executing the following Catspeak script ...
a = 1 if (a == 1) { } else if (a == 2) { }
... throws the following error
___________________________________________ ############################################################################################ ERROR in action number 1 of Create Event for object oCatspeakTest: Catspeak v3.0.0: in a file at (line 5, column 10) when parsing -- expected opening '{' at the start of 'else' block, got token '(' (0) at gml_Script___catspeak_error (line 25) - show_error(msg, false); ############################################################################################ gml_Script___catspeak_error (line 25) gml_Script_anon_CatspeakParser_gml_GlobalScript_scr_catspeak_parser_21137_CatspeakParser_gml_GlobalScript_scr_catspeak_parser (line 597) - __catspeak_error(dbg, " -- ", msg, ", got ", __tokenDebug()); gml_Script_anon_CatspeakParser_gml_GlobalScript_scr_catspeak_parser_7533_CatspeakParser_gml_GlobalScript_scr_catspeak_parser (line 203) - __ex("expected opening '{' at the start of '", keyword, "' block"); gml_Script_anon_CatspeakParser_gml_GlobalScript_scr_catspeak_parser_3645_CatspeakParser_gml_GlobalScript_scr_catspeak_parser (line 150) - __parseStatements("else"); gml_Script_anon_CatspeakParser_gml_GlobalScript_scr_catspeak_parser_2441_CatspeakParser_gml_GlobalScript_scr_catspeak_parser (line 96) - result = __parseExpression(); gml_Script_anon_CatspeakParser_gml_GlobalScript_scr_catspeak_parser_1931_CatspeakParser_gml_GlobalScript_scr_catspeak_parser (line 63) - __parseStatement(); gml_Script_anon_CatspeakEnvironment_gml_GlobalScript_scr_catspeak_environment_3622_CatspeakEnvironment_gml_GlobalScript_scr_catspeak_environment (line 97) - moreToParse = parser.update(); gml_Script_anon_CatspeakEnvironment_gml_GlobalScript_scr_catspeak_environment_4291_CatspeakEnvironment_gml_GlobalScript_scr_catspeak_environment (line 110) - return Catspeak.parse(buff); gml_Object_oCatspeakTest_Create_0 (line 23) - var _asg = Catspeak.parseString(@'
no crash :(
3.0.0-beta3
What is the bug? How did it happen?
Executing the following Catspeak script ...
... throws the following error
What was the expected behaviour?
no crash :(
Version
3.0.0-beta3