| 2215 | } |
| 2216 | |
| 2217 | void GDScriptAnalyzer::resolve_variable(GDScriptParser::VariableNode *p_variable, bool p_is_local) { |
| 2218 | static constexpr const char *kind = "variable"; |
| 2219 | resolve_assignable(p_variable, kind); |
| 2220 | |
| 2221 | #ifdef DEBUG_ENABLED |
| 2222 | if (p_is_local) { |
| 2223 | if (p_variable->usages == 0 && !String(p_variable->identifier->name).begins_with("_")) { |
| 2224 | parser->push_warning(p_variable, GDScriptWarning::UNUSED_VARIABLE, p_variable->identifier->name); |
| 2225 | } |
| 2226 | } |
| 2227 | is_shadowing(p_variable->identifier, kind, p_is_local); |
| 2228 | #endif // DEBUG_ENABLED |
| 2229 | } |
| 2230 | |
| 2231 | void GDScriptAnalyzer::resolve_constant(GDScriptParser::ConstantNode *p_constant, bool p_is_local) { |
| 2232 | static constexpr const char *kind = "constant"; |
nothing calls this directly
no test coverage detected