skipMany1 function

State skipMany1(
  1. State state
)

Implementation

State skipMany1(State state) {
  const template = '''
var {{tmp}} = false;
while (true) {
  {{@state}}
}
if ({{tmp}}) {
  {{@accept}}
}
{{@reject}}
''';
  const automaton = Automaton(
    accept: '{{tmp}} = true;\ncontinue;',
    reject: 'break;',
    result: 'null',
    template: template,
  );
  const generator = AutomatonGenerator(automaton);
  final start = generator.generate('void', state);
  return start;
}