Added scope package
This commit is contained in:
parent
fd66296826
commit
8e725da9c6
37 changed files with 416 additions and 371 deletions
|
@ -16,7 +16,7 @@ func (f *Function) TokenToRegister(t token.Token, register cpu.Register) error {
|
|||
switch t.Kind {
|
||||
case token.Identifier:
|
||||
name := t.Text()
|
||||
variable := f.Variable(name)
|
||||
variable := f.VariableByName(name)
|
||||
|
||||
if variable == nil {
|
||||
return errors.New(&errors.UnknownIdentifier{Name: name}, f.File, t.Position)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue