diff options
| author | Juan Linietsky | 2016-09-12 10:52:29 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-09-12 10:53:31 -0300 |
| commit | 37f1e86108a84c9b371e37c3854d8a03c8aea743 (patch) | |
| tree | eca23dd9556df6a398b0a667009f34a200ef363d /modules/gdscript/gd_compiler.cpp | |
| parent | 78f92dbcb9b193fb7a100ca7096c15a6899199fc (diff) | |
| download | godot-37f1e86108a84c9b371e37c3854d8a03c8aea743.tar.gz godot-37f1e86108a84c9b371e37c3854d8a03c8aea743.tar.zst godot-37f1e86108a84c9b371e37c3854d8a03c8aea743.zip | |
Diffstat (limited to 'modules/gdscript/gd_compiler.cpp')
| -rw-r--r-- | modules/gdscript/gd_compiler.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp index 923f8090f..2e2cbe7b2 100644 --- a/modules/gdscript/gd_compiler.cpp +++ b/modules/gdscript/gd_compiler.cpp @@ -1443,6 +1443,10 @@ Error GDCompiler::_parse_function(GDScript *p_script,const GDParser::ClassNode * #endif if (p_func) { gdfunc->_initial_line=p_func->line; +#ifdef TOOLS_ENABLED + + p_script->member_lines[func_name]=p_func->line; +#endif } else { gdfunc->_initial_line=0; } @@ -1672,6 +1676,12 @@ Error GDCompiler::_parse_class(GDScript *p_script, GDScript *p_owner, const GDPa p_script->member_indices[name]=minfo; p_script->members.insert(name); +#ifdef TOOLS_ENABLED + + p_script->member_lines[name]=p_class->variables[i].line; +#endif + + } for(int i=0;i<p_class->constant_expressions.size();i++) { @@ -1683,6 +1693,11 @@ Error GDCompiler::_parse_class(GDScript *p_script, GDScript *p_owner, const GDPa p_script->constants.insert(name,constant->value); //p_script->constants[constant->value].make_const(); +#ifdef TOOLS_ENABLED + + p_script->member_lines[name]=p_class->constant_expressions[i].expression->line; +#endif + } for(int i=0;i<p_class->_signals.size();i++) { @@ -1731,6 +1746,10 @@ Error GDCompiler::_parse_class(GDScript *p_script, GDScript *p_owner, const GDPa if (err) return err; +#ifdef TOOLS_ENABLED + + p_script->member_lines[name]=p_class->subclasses[i]->line; +#endif p_script->constants.insert(name,subclass); //once parsed, goes to the list of constants p_script->subclasses.insert(name,subclass); |
