summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gd_compiler.cpp
diff options
context:
space:
mode:
authorKarroffel <therzog@mail.de>2016-10-05 18:48:38 +0200
committerkarroffel <therzog@mail.de>2017-01-11 04:40:11 +0100
commitd445f0639fa9eccc44f1f9c153108f9e90981077 (patch)
tree7eba3294c80905c2c8f1acd47cdfb8939252c608 /modules/gdscript/gd_compiler.cpp
parentf8a7c462736bf886adc8bc3bbf424d534391d3dc (diff)
downloadredot-engine-d445f0639fa9eccc44f1f9c153108f9e90981077.tar.gz
pattern matcher: Implemented transformations
Diffstat (limited to 'modules/gdscript/gd_compiler.cpp')
-rw-r--r--modules/gdscript/gd_compiler.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp
index 2e2cbe7b29..f7765200b9 100644
--- a/modules/gdscript/gd_compiler.cpp
+++ b/modules/gdscript/gd_compiler.cpp
@@ -980,7 +980,7 @@ int GDCompiler::_parse_expression(CodeGen& codegen,const GDParser::Node *p_expre
} break;
//TYPE_TYPE,
default: {
-
+
ERR_EXPLAIN("Bug in bytecode compiler, unexpected node in parse tree while parsing expression.");
ERR_FAIL_V(-1); //unreachable code
} break;
@@ -1019,7 +1019,13 @@ Error GDCompiler::_parse_block(CodeGen& codegen,const GDParser::BlockNode *p_blo
switch(cf->cf_type) {
-
+ case GDParser::ControlFlowNode::CF_MATCH: {
+ Error err = _parse_block(codegen,cf->match->compiled_block,p_stack_level,p_break_addr,p_continue_addr);
+ if (err)
+ return err;
+
+ } break;
+
case GDParser::ControlFlowNode::CF_IF: {
#ifdef DEBUG_ENABLED