Why can't I parse a function evaluation of a function defined within the 
scope of another function?
i.e., the following terminates with an UndefVarError: bar not defined:

*function* foo()
  *function* bar()
    x
  end
  *return* eval(parse("bar()"))
end

x = 7
foo()

However, I can do

*function* foo()
  *function* bar()
    x
  end
  *return* bar()
end

x = 7
foo()

and

*function* foo()
  *return* eval(parse("bar()"))
end

*function* bar()
  x
end

x = 7
foo()

Many thanks!
-Pieterjan

Reply via email to