summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_function.h
diff options
context:
space:
mode:
authorThakee Nathees <thakeenathees@gmail.com>2020-11-29 08:07:57 +0530
committerThakee Nathees <thakeenathees@gmail.com>2020-11-29 19:45:36 +0530
commitd0e7d9b62f0bcc2ba438b12c8bfbf68d82fff0ea (patch)
treee2798248857411a781ac192cb847baed59ceb9f2 /modules/gdscript/gdscript_function.h
parentef2d1f6d19f861f0f4d9cf7c581795bc7f4016d8 (diff)
downloadredot-engine-d0e7d9b62f0bcc2ba438b12c8bfbf68d82fff0ea.tar.gz
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
Diffstat (limited to 'modules/gdscript/gdscript_function.h')
-rw-r--r--modules/gdscript/gdscript_function.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h
index bb5cc1284d..7bc20672d5 100644
--- a/modules/gdscript/gdscript_function.h
+++ b/modules/gdscript/gdscript_function.h
@@ -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);