mirror of
https://github.com/godotengine/godot.git
synced 2025-10-24 18:33:36 +00:00
Documentation: Add support for deprecated/experimental messages
This commit is contained in:
parent
907db8eebc
commit
af28f87791
75 changed files with 1165 additions and 738 deletions
|
|
@ -3609,11 +3609,17 @@ GDScriptParser::MemberDocData GDScriptParser::parse_doc_comment(int p_line, bool
|
|||
|
||||
if (state == DOC_LINE_NORMAL) {
|
||||
String stripped_line = doc_line.strip_edges();
|
||||
if (stripped_line.begins_with("@deprecated")) {
|
||||
if (stripped_line == "@deprecated" || stripped_line.begins_with("@deprecated:")) {
|
||||
result.is_deprecated = true;
|
||||
if (stripped_line.begins_with("@deprecated:")) {
|
||||
result.deprecated_message = stripped_line.trim_prefix("@deprecated:").strip_edges();
|
||||
}
|
||||
continue;
|
||||
} else if (stripped_line.begins_with("@experimental")) {
|
||||
} else if (stripped_line == "@experimental" || stripped_line.begins_with("@experimental:")) {
|
||||
result.is_experimental = true;
|
||||
if (stripped_line.begins_with("@experimental:")) {
|
||||
result.experimental_message = stripped_line.trim_prefix("@experimental:").strip_edges();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
@ -3712,11 +3718,17 @@ GDScriptParser::ClassDocData GDScriptParser::parse_class_doc_comment(int p_line,
|
|||
|
||||
result.tutorials.append(Pair<String, String>(title, link));
|
||||
continue;
|
||||
} else if (stripped_line.begins_with("@deprecated")) {
|
||||
} else if (stripped_line == "@deprecated" || stripped_line.begins_with("@deprecated:")) {
|
||||
result.is_deprecated = true;
|
||||
if (stripped_line.begins_with("@deprecated:")) {
|
||||
result.deprecated_message = stripped_line.trim_prefix("@deprecated:").strip_edges();
|
||||
}
|
||||
continue;
|
||||
} else if (stripped_line.begins_with("@experimental")) {
|
||||
} else if (stripped_line == "@experimental" || stripped_line.begins_with("@experimental:")) {
|
||||
result.is_experimental = true;
|
||||
if (stripped_line.begins_with("@experimental:")) {
|
||||
result.experimental_message = stripped_line.trim_prefix("@experimental:").strip_edges();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue