You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Cleaned up formating in gd_compiler.h
This commit is contained in:
@@ -37,16 +37,11 @@ class GDCompiler {
|
||||
|
||||
const GDParser *parser;
|
||||
struct CodeGen {
|
||||
|
||||
|
||||
GDScript *script;
|
||||
const GDParser::ClassNode *class_node;
|
||||
const GDParser::FunctionNode *function_node;
|
||||
|
||||
|
||||
bool debug_stack;
|
||||
|
||||
|
||||
List< Map<StringName,int> > stack_id_stack;
|
||||
Map<StringName,int> stack_identifiers;
|
||||
|
||||
@@ -54,12 +49,9 @@ class GDCompiler {
|
||||
List< Map<StringName,int> > block_identifier_stack;
|
||||
Map<StringName,int> block_identifiers;
|
||||
|
||||
|
||||
void add_stack_identifier(const StringName& p_id,int p_stackpos) {
|
||||
|
||||
stack_identifiers[p_id]=p_stackpos;
|
||||
if (debug_stack) {
|
||||
|
||||
block_identifiers[p_id]=p_stackpos;
|
||||
GDFunction::StackDebug sd;
|
||||
sd.added=true;
|
||||
@@ -71,7 +63,6 @@ class GDCompiler {
|
||||
}
|
||||
|
||||
void push_stack_identifiers() {
|
||||
|
||||
stack_id_stack.push_back( stack_identifiers );
|
||||
if (debug_stack) {
|
||||
|
||||
@@ -81,7 +72,6 @@ class GDCompiler {
|
||||
}
|
||||
|
||||
void pop_stack_identifiers() {
|
||||
|
||||
stack_identifiers = stack_id_stack.back()->get();
|
||||
stack_id_stack.pop_back();
|
||||
|
||||
@@ -98,16 +88,14 @@ class GDCompiler {
|
||||
block_identifiers=block_identifier_stack.back()->get();
|
||||
block_identifier_stack.pop_back();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// int get_identifier_pos(const StringName& p_dentifier) const;
|
||||
//int get_identifier_pos(const StringName& p_dentifier) const;
|
||||
HashMap<Variant,int,VariantHasher> constant_map;
|
||||
Map<StringName,int> name_map;
|
||||
|
||||
int get_name_map_pos(const StringName& p_identifier) {
|
||||
|
||||
int ret;
|
||||
if (!name_map.has(p_identifier)) {
|
||||
ret=name_map.size();
|
||||
@@ -118,11 +106,7 @@ class GDCompiler {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int get_constant_pos(const Variant& p_constant) {
|
||||
|
||||
|
||||
if (constant_map.has(p_constant))
|
||||
return constant_map[p_constant];
|
||||
int pos = constant_map.size();
|
||||
|
||||
Reference in New Issue
Block a user