diff --git a/MANUAL.md b/MANUAL.md index bbcbbc3..8ed2ff1 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -557,4 +557,12 @@ import "other.wl" "The A variable is accessible here: " A +``` + +## External Symbols + +WL programs may reference external symbols (variables or functions) defined by the host program. These symbols behave like variables and procedures, except they don't need to be declared and their names start with `$`. For instance, you could have a `$platform` symbol return the name of the current platform (as in "Linux" or "Windows") + +``` +

The process is running on a \$platform machine

``` \ No newline at end of file diff --git a/README.md b/README.md index c6e7d40..1a0b6e1 100644 --- a/README.md +++ b/README.md @@ -10,276 +10,37 @@ WL is a powerful and flexible, yet experimental scripting language for templatin 6. **No I/O or dynamic allocations** - Any I/O or memory management is left to the user 7. **Include system** - Modular template composition over multiple files -## Language - -WL is designed to be extremely powerful and flexible, but realistically you will use a small number of features most of the time. For instance, I expect most templates to look something like this: +To learn about the language check out the `MANUAL.md` file. But for a sneak peek, here's an example: ``` let title = "Title of my webpage" let items = ["A", "B", "C"] -let navigator =