Skip to main content

Module script

Module script 

Source
Expand description

Script execution: parse script to AST (assign, command, if/for/while, source), then interpret.

Structs§

ParseError
Parse error with message.

Enums§

CmdOutcome
Result of running one command line: success (exit 0), failed (non-zero), or exit requested.
ScriptStmt
One script statement.

Functions§

expand_vars
Expand $VAR and ${VAR} in s using vars; undefined names expand to empty string.
logical_lines
Turn script source into logical lines: join lines ending with \, strip # comments, skip blank.
parse_script
Parse logical lines into a list of script statements.
read_script_source_text
Load script text for source / REPL source / . path: workspace (guest-primary or VFS), then host (design §9).
run_script
Run script source: logical lines → parse to AST → interpret.