Skip to main content

Module constants

Module constants 

Source
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 FUNC definitions.
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::BASE into its parts; None for bare names.