mirror of
https://github.com/ParkerTenBroeck/automata.git
synced 2026-06-06 21:24:06 -04:00
fixed npda crash on duplicate states/symbols, reduced font size for edges, fixed incorrect caret color, fixed edge label alignment
This commit is contained in:
parent
13bcab9cd1
commit
47d7482342
5 changed files with 35 additions and 24 deletions
|
|
@ -211,8 +211,9 @@ impl Npda {
|
|||
State(0)
|
||||
}
|
||||
};
|
||||
if states.insert(ident, state).is_some() {
|
||||
if let Some(old) = states.insert(ident, state) {
|
||||
ctx.emit_error("state redefined", item.1);
|
||||
states.insert(ident, old);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -284,8 +285,9 @@ impl Npda {
|
|||
Symbol(0)
|
||||
}
|
||||
};
|
||||
if stack_symbols.insert(ident, symbol).is_some() {
|
||||
if let Some(old) = stack_symbols.insert(ident, symbol) {
|
||||
ctx.emit_error("stack symbol redefined", item.1);
|
||||
stack_symbols.insert(ident, old);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue