Skip to content

Commit

Permalink
Add support for enum docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Xwdit committed Jul 12, 2022
1 parent f2e88cd commit 74ecac1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/object/script_language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ Array Script::_get_script_documentation_list() {
}
json["tutorials"] = tutorials;

Array enums;
for (const KeyValue<String, String> &E : p_class.enums) {
Dictionary _enum;
_enum["name"] = E.key;
_enum["description"] = E.value;
enums.append(_enum);
}
json["enums"] = enums;

Array constants;
for (int i = 0; i < p_class.constants.size(); i++) {
Dictionary constant;
Expand Down

0 comments on commit 74ecac1

Please sign in to comment.