Implicitly define nonlocal names.

If a capitalized name cannot be resolved, a new top-level
variable with its name is implicitly declared. If a real
definition is not found later, a compile time error is raised.

Mutual recursion at the top level works now!

Fix #101. Fix #106.
This commit is contained in:
Bob Nystrom
2015-01-14 23:08:25 -08:00
parent 74a7ac6b95
commit c50e46725f
14 changed files with 152 additions and 53 deletions
+7
View File
@@ -0,0 +1,7 @@
var fn = new Fn {
IO.print(Foo)
IO.print(Bar)
}
// expect error line 7
// expect error line 7