Added tests for expression matching

This commit is contained in:
ThreeRhinosInAnElephantCostume 2021-08-25 15:42:48 +02:00
parent 6c258a89de
commit 15ccd83ada
5 changed files with 87 additions and 1 deletions

View file

@ -1746,8 +1746,9 @@ GDScriptParser::MatchBranchNode *GDScriptParser::parse_match_branch() {
push_error(R"(No pattern found for "match" branch.)");
}
if (!consume(GDScriptTokenizer::Token::COLON, R"(Expected ":" after "match" patterns.)"))
if (!consume(GDScriptTokenizer::Token::COLON, R"(Expected ":" after "match" patterns.)")) {
return nullptr;
}
// Save continue state.
bool could_continue = can_continue;