diff options
author | L0P0P <grassoemanuele@live.com> | 2024-06-26 11:44:58 +0200 |
---|---|---|
committer | L0P0P <grassoemanuele@live.com> | 2024-06-26 11:44:58 +0200 |
commit | 9e6c17cb44bc165e315ec039a0e09183716d2037 (patch) | |
tree | 4a64fd37fa9b2483b88a5f33a37c6b9b51812d81 /src/ast/nodes/FuncdefNode.java | |
parent | fc712f94a7ed8554d8d44f4965be367354a7e670 (diff) |
Semantic check for function declaration and function invocation
Diffstat (limited to 'src/ast/nodes/FuncdefNode.java')
-rw-r--r-- | src/ast/nodes/FuncdefNode.java | 5 |
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; } |