add _log function to environment + enable explicit order of orthogonal regions

This commit is contained in:
Joeri Exelmans 2025-10-22 11:15:33 +02:00
parent 098a6d7e78
commit 45cfc6f1f8
2 changed files with 12 additions and 2 deletions

View file

@ -7,7 +7,10 @@ export function initialize(ast: Statechart): BigStepOutput {
let history = new Map();
let enteredStates, environment, rest;
({enteredStates, environment, history, ...rest} = enterDefault(0, ast.root, {
environment: new Environment([new Map([["_timers", []]])]),
environment: new Environment([new Map<string, any>([
["_timers", []],
["_log", (str: string) => console.log(str)],
])]),
history,
...initialRaised,
}));