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

Method apply_pending_warnings

modules/gdscript/gdscript_parser.cpp:222–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222void GDScriptParser::apply_pending_warnings() {
223 for (const PendingWarning &pw : pending_warnings) {
224 if (warning_ignored_lines[pw.code].has(pw.source->start_line)) {
225 continue;
226 }
227 if (warning_ignore_start_lines[pw.code] <= pw.source->start_line) {
228 continue;
229 }
230
231 GDScriptWarning warning;
232 warning.code = pw.code;
233 warning.symbols = pw.symbols;
234 warning.start_line = pw.source->start_line;
235 warning.end_line = pw.source->end_line;
236
237 if (pw.treated_as_error) {
238 push_error(warning.get_message() + String(" (Warning treated as error.)"), pw.source);
239 continue;
240 }
241
242 List<GDScriptWarning>::Element *before = nullptr;
243 for (List<GDScriptWarning>::Element *E = warnings.front(); E; E = E->next()) {
244 if (E->get().start_line > warning.start_line) {
245 break;
246 }
247 before = E;
248 }
249 if (before) {
250 warnings.insert_after(before, warning);
251 } else {
252 warnings.push_front(warning);
253 }
254 }
255
256 pending_warnings.clear();
257}
258#endif // DEBUG_ENABLED
259
260void GDScriptParser::override_completion_context(const Node *p_for_node, CompletionType p_type, Node *p_node, int p_argument) {

Callers 1

resolve_bodyMethod · 0.80

Calls 9

insert_afterMethod · 0.80
StringClass · 0.50
hasMethod · 0.45
get_messageMethod · 0.45
frontMethod · 0.45
nextMethod · 0.45
getMethod · 0.45
push_frontMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected