docs: add initial modules documentation and update error/variable terminology

Create new modules.markdown guide explaining Wren's module system, import syntax, and top-level scoping. Update error-handling.markdown to use "Top-level variable" instead of "Global variable" in error messages. Revise variables.markdown to clarify top-level variable visibility and link to the new modules page. Add "Modules" link to the site navigation template.
This commit is contained in:
Bob Nystrom
2015-02-18 15:55:09 +00:00
parent 0d3eae5269
commit e564621bd5
4 changed files with 209 additions and 5 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ same name in the same scope. So if you do:
Wren tells you:
:::text
[script.wren line 2] Error on 'a': Global variable is already defined.
[script.wren line 2] Error on 'a': Top-level variable is already defined.
Note that it does this before it executes *any* code. Unlike some other
scripting languages, Wren tries to help you find your errors as soon as