loading machines visually now downs

This commit is contained in:
Parker TenBroeck 2026-01-09 22:55:39 -05:00
parent c57a95b7b5
commit 62cda62b31
7 changed files with 230 additions and 64 deletions

View file

@ -169,15 +169,7 @@ pub fn compile(input: &str) -> CompileResult {
let mut ctx = Context::new(input);
let result = automata::loader::parse_universal(&mut ctx);
let graph = if let Some(result) = result {
Some(match result {
loader::Machine::Fa(fa) => serde_json::to_string(&fa).unwrap(),
loader::Machine::Pda(pda) => serde_json::to_string(&pda).unwrap(),
loader::Machine::Tm(tm) => serde_json::to_string(&tm).unwrap(),
})
} else {
None
};
let graph = result.map(|result| serde_json::to_string(&result).unwrap());
use std::fmt::Write;
let log_formatted = ctx.logs_display().fold(String::new(), |mut s, e| {