You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
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
This commit is contained in:
@@ -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<DocData::ClassDoc> &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<Script> get_template(const String &p_class_name, const String &p_base_class_name) const = 0;
|
||||
virtual void make_template(const String &p_class_name, const String &p_base_class_name, Ref<Script> &p_script) {}
|
||||
virtual bool is_using_templates() { return false; }
|
||||
virtual bool has_documentation() { return false; }
|
||||
virtual bool validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path = "", List<String> *r_functions = nullptr, List<Warning> *r_warnings = nullptr, Set<int> *r_safe_lines = nullptr) const = 0;
|
||||
virtual String validate_path(const String &p_path) const { return ""; }
|
||||
virtual Script *create_script() const = 0;
|
||||
|
||||
Reference in New Issue
Block a user