MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / resolve_variable

Method resolve_variable

modules/gdscript/gdscript_analyzer.cpp:2217–2229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2215}
2216
2217void 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
2231void GDScriptAnalyzer::resolve_constant(GDScriptParser::ConstantNode *p_constant, bool p_is_local) {
2232 static constexpr const char *kind = "constant";

Callers

nothing calls this directly

Calls 3

begins_withMethod · 0.80
StringClass · 0.50
push_warningMethod · 0.45

Tested by

no test coverage detected