diff options
author | L0P0P <grassoemanuele@live.com> | 2024-06-26 11:54:57 +0200 |
---|---|---|
committer | L0P0P <grassoemanuele@live.com> | 2024-06-26 11:54:57 +0200 |
commit | e09358f3648445bbf9747f40497af6221d933a99 (patch) | |
tree | 50a81c435e6c410503000f71ead6c2ee62bf6111 /src/ast/nodes/FuncdefNode.java | |
parent | 9e6c17cb44bc165e315ec039a0e09183716d2037 (diff) |
Introduction to recursive function
Diffstat (limited to 'src/ast/nodes/FuncdefNode.java')
-rw-r--r-- | src/ast/nodes/FuncdefNode.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ast/nodes/FuncdefNode.java b/src/ast/nodes/FuncdefNode.java index f3be1d9..4c8f92f 100644 --- a/src/ast/nodes/FuncdefNode.java +++ b/src/ast/nodes/FuncdefNode.java @@ -33,6 +33,8 @@ public class FuncdefNode implements Node { ST.add(HM); + ST.insert(this.name.toString(), this.block.typeCheck(), _nesting + 1, ""); + if (paramlist != null) { errors.addAll(paramlist.checkSemantics(ST, _nesting + 1)); } |