| 2420 | } |
| 2421 | |
| 2422 | void GDScriptAnalyzer::resolve_match_branch(GDScriptParser::MatchBranchNode *p_match_branch, GDScriptParser::ExpressionNode *p_match_test) { |
| 2423 | // Apply annotations. |
| 2424 | for (GDScriptParser::AnnotationNode *&E : p_match_branch->annotations) { |
| 2425 | resolve_annotation(E); |
| 2426 | E->apply(parser, p_match_branch, nullptr); /// @todo Provide `p_class`. |
| 2427 | } |
| 2428 | |
| 2429 | for (int i = 0; i < p_match_branch->patterns.size(); i++) { |
| 2430 | resolve_match_pattern(p_match_branch->patterns[i], p_match_test); |
| 2431 | } |
| 2432 | |
| 2433 | if (p_match_branch->guard_body) { |
| 2434 | resolve_suite(p_match_branch->guard_body); |
| 2435 | } |
| 2436 | |
| 2437 | resolve_suite(p_match_branch->block); |
| 2438 | |
| 2439 | decide_suite_type(p_match_branch, p_match_branch->block); |
| 2440 | } |
| 2441 | |
| 2442 | void GDScriptAnalyzer::resolve_match_pattern(GDScriptParser::PatternNode *p_match_pattern, GDScriptParser::ExpressionNode *p_match_test) { |
| 2443 | if (p_match_pattern == nullptr) { |