You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Allow whitespaces in warning-ignore comments
This commit is contained in:
@@ -534,13 +534,14 @@ void GDScriptTokenizerText::_advance() {
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (comment.begins_with("#warning-ignore:")) {
|
||||
String code = comment.get_slice(":", 1);
|
||||
String comment_content = comment.trim_prefix("#").trim_prefix(" ");
|
||||
if (comment_content.begins_with("warning-ignore:")) {
|
||||
String code = comment_content.get_slice(":", 1);
|
||||
warning_skips.push_back(Pair<int, String>(line, code.strip_edges().to_lower()));
|
||||
} else if (comment.begins_with("#warning-ignore-all:")) {
|
||||
String code = comment.get_slice(":", 1);
|
||||
} else if (comment_content.begins_with("warning-ignore-all:")) {
|
||||
String code = comment_content.get_slice(":", 1);
|
||||
warning_global_skips.insert(code.strip_edges().to_lower());
|
||||
} else if (comment.strip_edges() == "#warnings-disable") {
|
||||
} else if (comment_content.strip_edges() == "warnings-disable") {
|
||||
ignore_warnings = true;
|
||||
}
|
||||
#endif // DEBUG_ENABLED
|
||||
|
||||
Reference in New Issue
Block a user