toNfa method

  1. @override
Nfa toNfa()
override

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);
}