about summary refs log tree commit diff
path: root/pkg/lang/compiler/scope_chain.go
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-07-11 11:07:51 +0200
committerMel <einebeere@gmail.com>2022-07-11 11:07:51 +0200
commit74dd678dfd1aae9e655fd13cb65278ea9ba307e2 (patch)
tree6dc757259edb4f7163e0563c9acec2a239f56d80 /pkg/lang/compiler/scope_chain.go
parent7a60e91c8c45663127cfa3aa31a14c930f717aeb (diff)
downloadjinx-74dd678dfd1aae9e655fd13cb65278ea9ba307e2.tar.zst
jinx-74dd678dfd1aae9e655fd13cb65278ea9ba307e2.zip
Reimplement argument counts
Diffstat (limited to 'pkg/lang/compiler/scope_chain.go')
-rw-r--r--pkg/lang/compiler/scope_chain.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/lang/compiler/scope_chain.go b/pkg/lang/compiler/scope_chain.go
index 3a3b819..6705852 100644
--- a/pkg/lang/compiler/scope_chain.go
+++ b/pkg/lang/compiler/scope_chain.go
@@ -91,7 +91,7 @@ func (sc *ScopeChain) Declare(name string) (int, bool) {
 	return indexInScope, true
 }
 
-func (sc *ScopeChain) DeclareFunction(name string) (code.Marker, bool) {
+func (sc *ScopeChain) DeclareFunction(name string, args uint) (code.Marker, bool) {
 	if _, ok := sc.nameToSymbol[name]; ok {
 		return "", false
 	}
@@ -111,6 +111,7 @@ func (sc *ScopeChain) DeclareFunction(name string) (code.Marker, bool) {
 		name: name,
 		data: SymbolFunction{
 			marker: unitName,
+			args:   args,
 		},
 	})