Added scope package

This commit is contained in:
2024-07-20 23:20:23 +02:00
parent 263c0cfb8b
commit 43cdac5572
37 changed files with 416 additions and 371 deletions

View File

@ -13,7 +13,7 @@ func (f *Function) ExecuteLeaf(operation token.Token, register cpu.Register, ope
switch operand.Kind {
case token.Identifier:
name := operand.Text()
variable := f.Variable(name)
variable := f.VariableByName(name)
if variable == nil {
return errors.New(&errors.UnknownIdentifier{Name: name}, f.File, operand.Position)