diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-12-16 22:31:57 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-12-16 22:31:57 -0300 |
commit | bcf27feb980aec593c7cb771984e46113cfad757 (patch) | |
tree | dabc98af627732ccf5d1bbfa8aa58348030f6324 /modules/gdscript/gd_compiler.cpp | |
parent | be4e40e90a5a322f6a7cec4893854ef5b15db600 (diff) | |
download | redot-engine-bcf27feb980aec593c7cb771984e46113cfad757.tar.gz |
New Code Completion
-=-=-=-=-=-=-=-=-=-
-Massive improvement to code completion
-Argument hinting for functions
If you manage to out-smart the code-completion in a situation where completion
should be possible to guess, let me know.
Please enter the commit message for your changes. Lines starting
Diffstat (limited to 'modules/gdscript/gd_compiler.cpp')
-rw-r--r-- | modules/gdscript/gd_compiler.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp index 5595db95de..d4fe8b626b 100644 --- a/modules/gdscript/gd_compiler.cpp +++ b/modules/gdscript/gd_compiler.cpp @@ -1168,6 +1168,7 @@ Error GDCompiler::_parse_function(GDScript *p_script,const GDParser::ClassNode * codegen.current_line=0; codegen.call_max=0; codegen.debug_stack=ScriptDebugger::get_singleton()!=NULL; + Vector<StringName> argnames; int stack_level=0; @@ -1175,6 +1176,9 @@ Error GDCompiler::_parse_function(GDScript *p_script,const GDParser::ClassNode * for(int i=0;i<p_func->arguments.size();i++) { int idx = i; codegen.add_stack_identifier(p_func->arguments[i],i); +#ifdef TOOLS_ENABLED + argnames.push_back(p_func->arguments[i]); +#endif } stack_level=p_func->arguments.size(); } @@ -1249,6 +1253,9 @@ Error GDCompiler::_parse_function(GDScript *p_script,const GDParser::ClassNode * if (p_func) gdfunc->_static=p_func->_static; +#ifdef TOOLS_ENABLED + gdfunc->arg_names=argnames; +#endif //constants if (codegen.constant_map.size()) { gdfunc->_constant_count=codegen.constant_map.size(); |