MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / add_parameter

Method add_parameter

modules/gdscript/gdscript_byte_codegen.cpp:43–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41#include "core/debugger/engine_debugger.h"
42
43uint32_t GDScriptByteCodeGenerator::add_parameter(const StringName &p_name, bool p_is_optional, const GDScriptDataType &p_type) {
44 function->_argument_count++;
45 function->argument_types.push_back(p_type);
46 if (p_is_optional) {
47 function->_default_arg_count++;
48 }
49
50 return add_local(p_name, p_type);
51}
52
53uint32_t GDScriptByteCodeGenerator::add_local(const StringName &p_name, const GDScriptDataType &p_type) {
54 int stack_pos = locals.size() + GDScriptFunction::FIXED_ADDRESSES_MAX;

Callers 1

_parse_functionMethod · 0.45

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected