parse method

GlobNodeSegments parse(
  1. String? input
)

Implementation

GlobNodeSegments parse(String? input) {
  if (input == null) {
    throw ArgumentError('input');
  }

  if (input.isEmpty) {
    final literal = GlobNodeLiteral('', 0);
    final segment = GlobNodeSegment('', 0, false, [literal]);
    return GlobNodeSegments('', 0, [segment]);
  }

  _input = input;
  _reset();
  _parse();
  return GlobNodeSegments(_input, 0, _segments);
}