From 65509298306628bbbdd3caacb6a0ce5899fe147a Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Sat, 2 Sep 2017 21:52:45 +0200 Subject: DocData: Include enum attributes in return nodes --- editor/doc/doc_data.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp index 5975e54356..6848c43b68 100644 --- a/editor/doc/doc_data.cpp +++ b/editor/doc/doc_data.cpp @@ -634,6 +634,9 @@ static Error _parse_methods(Ref &parser, Vector & ERR_FAIL_COND_V(!parser->has_attribute("type"), ERR_FILE_CORRUPT); method.return_type = parser->get_attribute_value("type"); + if (parser->has_attribute("enum")) { + method.return_enum = parser->get_attribute_value("enum"); + } } else if (name == "argument") { DocData::ArgumentDoc argument; @@ -916,7 +919,11 @@ Error DocData::save(const String &p_path) { if (m.return_type != "") { - _write_string(f, 3, ""); + String enum_text; + if (m.return_enum != String()) { + enum_text = " enum=\"" + m.return_enum + "\""; + } + _write_string(f, 3, ""); _write_string(f, 3, ""); } -- cgit v1.2.3