Added scope package
This commit is contained in:
@ -17,7 +17,7 @@ func (f *Function) CompileAssign(node *ast.Assign) error {
|
||||
|
||||
if left.IsLeaf() {
|
||||
name := left.Token.Text()
|
||||
variable := f.Variable(name)
|
||||
variable := f.VariableByName(name)
|
||||
|
||||
if variable == nil {
|
||||
return errors.New(&errors.UnknownIdentifier{Name: name}, f.File, left.Token.Position)
|
||||
@ -29,7 +29,7 @@ func (f *Function) CompileAssign(node *ast.Assign) error {
|
||||
|
||||
if left.Token.Kind == token.Operator && left.Token.Text() == "@" {
|
||||
name := left.Children[0].Token.Text()
|
||||
variable := f.Variable(name)
|
||||
variable := f.VariableByName(name)
|
||||
|
||||
if variable == nil {
|
||||
return errors.New(&errors.UnknownIdentifier{Name: name}, f.File, left.Children[0].Token.Position)
|
||||
|
Reference in New Issue
Block a user