From d0e7d9b62f0bcc2ba438b12c8bfbf68d82fff0ea Mon Sep 17 00:00:00 2001 From: Thakee Nathees Date: Sun, 29 Nov 2020 08:07:57 +0530 Subject: Documentation generation for GDScript - ClassDoc added to GDScript and property reflection data were extracted from parse tree - GDScript comments are collected from tokenizer for documentation and applied to the ClassDoc by the GDScript compiler - private docs were excluded (name with underscore prefix and doesn't have any doc comments) - default values (of non exported vars), arguments are extraced from the parser - Integrated with GDScript 2.0 and new enums were added. - merge conflicts fixed --- core/object/script_language.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/object') diff --git a/core/object/script_language.h b/core/object/script_language.h index 3fd56c2f15..e34e5060a4 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -35,6 +35,7 @@ #include "core/io/resource.h" #include "core/templates/map.h" #include "core/templates/pair.h" +#include "editor/doc_data.h" class ScriptLanguage; @@ -145,6 +146,10 @@ public: virtual void set_source_code(const String &p_code) = 0; virtual Error reload(bool p_keep_state = false) = 0; +#ifdef TOOLS_ENABLED + virtual const Vector &get_documentation() const = 0; +#endif // TOOLS_ENABLED + virtual bool has_method(const StringName &p_method) const = 0; virtual MethodInfo get_method_info(const StringName &p_method) const = 0; @@ -305,6 +310,7 @@ public: virtual Ref