summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/gdscript_compiler.h')
-rw-r--r--modules/gdscript/gdscript_compiler.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/gdscript/gdscript_compiler.h b/modules/gdscript/gdscript_compiler.h
index 34b066b5c7..315d4f1842 100644
--- a/modules/gdscript/gdscript_compiler.h
+++ b/modules/gdscript/gdscript_compiler.h
@@ -36,13 +36,11 @@
#include "gdscript_parser.h"
class GDScriptCompiler {
-
const GDScriptParser *parser;
Set<GDScript *> parsed_classes;
Set<GDScript *> parsing_classes;
GDScript *main_script;
struct CodeGen {
-
GDScript *script;
const GDScriptParser::ClassNode *class_node;
const GDScriptParser::FunctionNode *function_node;
@@ -71,7 +69,6 @@ class GDScriptCompiler {
void push_stack_identifiers() {
stack_id_stack.push_back(stack_identifiers);
if (debug_stack) {
-
block_identifier_stack.push_back(block_identifiers);
block_identifiers.clear();
}
@@ -83,7 +80,6 @@ class GDScriptCompiler {
if (debug_stack) {
for (Map<StringName, int>::Element *E = block_identifiers.front(); E; E = E->next()) {
-
GDScriptFunction::StackDebug sd;
sd.added = false;
sd.identifier = E->key();
@@ -114,8 +110,9 @@ class GDScriptCompiler {
}
int get_constant_pos(const Variant &p_constant) {
- if (constant_map.has(p_constant))
+ if (constant_map.has(p_constant)) {
return constant_map[p_constant];
+ }
int pos = constant_map.size();
constant_map[p_constant] = pos;
return pos;
@@ -123,10 +120,14 @@ class GDScriptCompiler {
Vector<int> opcodes;
void alloc_stack(int p_level) {
- if (p_level >= stack_max) stack_max = p_level + 1;
+ if (p_level >= stack_max) {
+ stack_max = p_level + 1;
+ }
}
void alloc_call(int p_params) {
- if (p_params >= call_max) call_max = p_params;
+ if (p_params >= call_max) {
+ call_max = p_params;
+ }
}
int current_line;