toNfa method
Compiles this AST node into a nondeterministic finite automaton (Nfa).
Implementation
@override
Nfa toNfa() {
final leftNfa = left.toNfa();
final rightNfa = right.toNfa();
leftNfa.end.epsilons.add(rightNfa.start);
leftNfa.end.isEnd = false;
return Nfa(start: leftNfa.start, end: rightNfa.end);
}