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:
Thakee Nathees 2020-11-29 08:07:57 +05:30
parent ef2d1f6d19
commit d0e7d9b62f
21 changed files with 1036 additions and 76 deletions

View file

@ -379,6 +379,7 @@ private:
#ifdef TOOLS_ENABLED
Vector<StringName> arg_names;
Vector<Variant> default_arg_values;
#endif
List<StackDebug> stack_debug;
@ -458,6 +459,11 @@ public:
ERR_FAIL_INDEX_V(p_idx, default_arguments.size(), Variant());
return default_arguments[p_idx];
}
#ifdef TOOLS_ENABLED
const Vector<Variant> &get_default_arg_values() const {
return default_arg_values;
}
#endif // TOOLS_ENABLED
Variant call(GDScriptInstance *p_instance, const Variant **p_args, int p_argcount, Callable::CallError &r_err, CallState *p_state = nullptr);