summaryrefslogtreecommitdiff
path: root/src/ast/nodes/FuncdefNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/nodes/FuncdefNode.java')
-rw-r--r--src/ast/nodes/FuncdefNode.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ast/nodes/FuncdefNode.java b/src/ast/nodes/FuncdefNode.java
index 742f670..f3be1d9 100644
--- a/src/ast/nodes/FuncdefNode.java
+++ b/src/ast/nodes/FuncdefNode.java
@@ -37,10 +37,13 @@ public class FuncdefNode implements Node {
errors.addAll(paramlist.checkSemantics(ST, _nesting + 1));
}
+ // TODO: think to the fucking offset
// Offset is increased for the possible return value
ST.increaseoffset();
- errors.addAll(block.checkSemantics(ST, _nesting));
+ errors.addAll(block.checkSemantics(ST, _nesting + 1));
+
+ ST.remove();
return errors;
}