Expand description
Language-level constants: the module separator, system module names, and reserved keywords.
Single source of truth shared by the grammar lowerer (parser.rs), the
macro token walker (macro_input.rs), and the runtime registry
(oxdock-core). Changing any of these must update exactly one
definition here; dsl.pest carries the same spellings by necessity (a
grammar file cannot reference Rust constants) and the bidirectional
keyword conformance test locks the two together.
Constants§
- KEYWORD_
ASYNC - KEYWORD_
AWAIT - KEYWORD_
BREAK - KEYWORD_
CANCEL - KEYWORD_
CONTINUE - KEYWORD_
ELSE - KEYWORD_
EXPORT - Reserved for future script-module support; rejected at lowering.
- KEYWORD_
FOR - KEYWORD_
FUNC - KEYWORD_
IF - KEYWORD_
IMPORT - Bare-call scope directive (a lowering directive, not a runtime step).
- KEYWORD_
INSPECT - Variable inspection: a dedicated AST node, never a registry entry, so it needs no import and accepts no qualifier.
- KEYWORD_
LET - Bare-word statement starters parsed by PEG rules rather than command
lowering. Each is referenced by
crate::STRUCTURAL_KEYWORDS; spelling lives here exactly once. - KEYWORD_
RETURN - KEYWORD_
WHILE - MODULE_
SEPARATOR - Separator between module and function name (
STD::GLOB). - SCRIPT_
MODULE_ NAME - Module holding in-script
FUNCdefinitions. - STD_
MODULE_ NAME - Module holding the compiled-in builtins.
Functions§
- base_
name - Base of
MODULE::BASE, or the name itself when bare. Used for human-facing step errors; listings (FUNCTIONS(),DESCRIBE) keep the qualified form. - qualify
- Canonical qualified form:
MODULE::BASE. - split_
qualified - Split
MODULE::BASEinto its parts;Nonefor bare names.