| 220 | } |
| 221 | |
| 222 | void 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 | |
| 260 | void GDScriptParser::override_completion_context(const Node *p_for_node, CompletionType p_type, Node *p_node, int p_argument) { |
no test coverage detected