Merge branch 'main' into gh-pages

This commit is contained in:
Parker TenBroeck 2026-01-09 23:24:03 -05:00
commit a304f9c3f4
3 changed files with 5 additions and 5 deletions

View file

@ -111,7 +111,7 @@ impl<'a> Fa<'a> {
}
}
TL::Item(S("F", _), list) => {
if final_states.is_empty() {
if !final_states.is_empty() {
ctx.emit_error("final states already set", span);
}
let Some(list) = list.expect_set(ctx) else {
@ -124,7 +124,7 @@ impl<'a> Fa<'a> {
if states.contains_key(&State(ident)) {
if final_states
.insert(State(ident), StateInfo { definition: item.1 })
.is_none()
.is_some()
{
ctx.emit_error("final state redefined", item.1);
}

View file

@ -92,7 +92,7 @@ impl<'a> Lexer<'a> {
}
fn begin_ident(c: char) -> bool {
c.is_alphabetic() || c == '_' || (!c.is_ascii() && !c.is_control() && !c.is_whitespace())
c.is_alphanumeric() || c == '_' || (!c.is_ascii() && !c.is_control() && !c.is_whitespace())
}
fn continue_ident(c: char) -> bool {

View file

@ -160,7 +160,7 @@ export function setAutomaton(auto: Machine) {
font,
from: to_from[0],
to: to_from[1],
label: transitions.map(i => i.repr).join("\n"),
label: transitions.map(i => i.repr).join(auto.type=="fa"?",":"\n"),
});
} else {
edges.add({
@ -168,7 +168,7 @@ export function setAutomaton(auto: Machine) {
font,
from: to_from[0],
to: to_from[1],
label: transitions.map(i => i.repr).join("\n"),
label: transitions.map(i => i.repr).join(auto.type=="fa"?",":"\n"),
});
}
}