Targets · JSON · Reserved words
Reserved words
The canonical form has none.
Contents
JSON is the canonical command form every module is stored in — the interchange the other targets render from, not a language you run. These pages describe that form.
- Introduction — what the JSON form is, and how to read the rest of this section.
- Capabilities — which high-level features are possible — deferred to whichever target this JSON renders to.
- Example — a full program using every keyword, in the canonical JSON form.
- Naming considerations — how Program's dotted names are stored, verbatim and un-munged.
- Object format — every node in the self-describing object form, keyword by keyword.
- Array format — every node in the compact tagged-array form, keyword by keyword.
- Project setup — there is no build; how a module file is stored, read and rendered onward.
- Reserved words — why the canonical form has none, and never escapes a name.
No reserved words, no escaping
JSON has no reserved words to collide with: every Program name lives inside a quoted string, where a
word like class or type is just text. So the trailing _ that
the compiled targets add to escape their own keywords is never needed here, and is never applied
— the stored name is always the original Program name. It is each rendering plugin, reading
from this canonical form, that adds the _ only when its own language needs it —
see, for example, the JavaScript reserved
words.