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 --- modules/gdnative/pluginscript/pluginscript_script.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/gdnative/pluginscript/pluginscript_script.h') diff --git a/modules/gdnative/pluginscript/pluginscript_script.h b/modules/gdnative/pluginscript/pluginscript_script.h index 150de05e74..790e4d5ffb 100644 --- a/modules/gdnative/pluginscript/pluginscript_script.h +++ b/modules/gdnative/pluginscript/pluginscript_script.h @@ -97,6 +97,13 @@ public: // TODO: load_source_code only allow utf-8 file, should handle bytecode as well ? virtual Error load_source_code(const String &p_path); +#ifdef TOOLS_ENABLED + virtual const Vector &get_documentation() const override { + static Vector docs; + return docs; + } +#endif // TOOLS_ENABLED + virtual bool has_method(const StringName &p_method) const override; virtual MethodInfo get_method_info(const StringName &p_method) const override; -- cgit v1.2.3 From 42bfa169960b59c5d9337e9f63862f5feae92d58 Mon Sep 17 00:00:00 2001 From: Thakee Nathees Date: Sun, 29 Nov 2020 09:12:06 +0530 Subject: Refactor DocData into core and editor (DocTools) parts --- modules/gdnative/pluginscript/pluginscript_script.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/gdnative/pluginscript/pluginscript_script.h') diff --git a/modules/gdnative/pluginscript/pluginscript_script.h b/modules/gdnative/pluginscript/pluginscript_script.h index 790e4d5ffb..dc1ed6d576 100644 --- a/modules/gdnative/pluginscript/pluginscript_script.h +++ b/modules/gdnative/pluginscript/pluginscript_script.h @@ -32,6 +32,8 @@ #define PLUGINSCRIPT_SCRIPT_H // Godot imports + +#include "core/doc_data.h" #include "core/object/script_language.h" // PluginScript imports #include "pluginscript_language.h" -- cgit v1.2.3