parse_comment method

dynamic parse_comment()

Implementation

dynamic parse_comment() {
  var $$;
  switch (_ch >= 0 && _ch <= 1114111
      ? 0
      : _ch == -1
          ? 2
          : 1) {
    case 0:
    case 2:
      var ch0 = _ch, pos0 = _cursor, startPos0 = _startPos;
      _startPos = _cursor;
      while (true) {
        $$ = _parse_LPAREN();
        if (!success) break;
        var seq = List<dynamic>.filled(3, null, growable: false)..[0] = $$;
        var testing0 = _testing;
        for (var reps = [];;) {
          _testing = _cursor;
          switch (_getState(_transitions20)) {
            case 0:
              var startPos1 = _startPos;
              _startPos = _cursor;
              $$ = parse_comment();
              _startPos = startPos1;
              break;
            case 1:
            case 4:
              while (true) {
                var startPos2 = _startPos;
                _startPos = _cursor;
                $$ = _parse_ctext();
                _startPos = startPos2;
                if (success) break;
                var startPos3 = _startPos;
                _startPos = _cursor;
                $$ = parse_comment();
                _startPos = startPos3;
                break;
              }
              break;
            case 2:
              while (true) {
                var startPos4 = _startPos;
                _startPos = _cursor;
                $$ = _parse_quoted_pair();
                _startPos = startPos4;
                if (success) break;
                var startPos5 = _startPos;
                _startPos = _cursor;
                $$ = parse_comment();
                _startPos = startPos5;
                break;
              }
              break;
            case 3:
              $$ = null;
              success = false;
              break;
          }
          if (!success && _cursor > _testing) {
            _failure(const [null]);
          }
          if (success) {
            reps.add($$);
          } else {
            success = true;
            _testing = testing0;
            $$ = reps;
            break;
          }
        }
        if (!success) break;
        seq[1] = $$;
        $$ = _parse_RPAREN();
        if (!success) break;
        seq[2] = $$;
        $$ = seq;
        break;
      }
      if (!success) {
        _ch = ch0;
        _cursor = pos0;
      }
      _startPos = startPos0;
      break;
    case 1:
      $$ = null;
      success = false;
      break;
  }
  if (!success && _cursor > _testing) {
    _failure(_expect25);
  }
  return $$;
}