parseAll method
Parses raw input bytes and returns translated TUI Msg instances.
The parser buffers incomplete sequences across calls.
When expired is true, the parser flushes incomplete sequences (e.g. on
EOF or after an escape timeout).
Implementation
List<Msg> parseAll(List<int> bytes, {bool expired = false}) {
final out = <Msg>[];
final evs = _events.parseAll(bytes, expired: expired);
for (final ev in evs) {
if (ev is uvev.UnknownEvent) {
final mapped = _table[ev.value];
if (mapped != null) {
out.add(KeyMsg(_toTermKey(mapped)));
continue;
}
}
if (ev is uvev.PasteEvent) {
out.add(PasteMsg(ev.content));
continue;
}
final msgs = _eventToMsgs(ev);
if (msgs.isEmpty) {
out.add(UvEventMsg(ev));
} else {
out.addAll(msgs);
}
}
return out;
}