parseParameters<T> static method

List<String>? parseParameters<T>(
  1. DOMActionExecutor executor,
  2. String? parametersLine
)

Implementation

static List<String>? parseParameters<T>(
    DOMActionExecutor executor, String? parametersLine) {
  if (parametersLine == null) return null;
  parametersLine = parametersLine.trim();
  if (parametersLine.isEmpty) return null;

  var matches = _regexpParameterCapture.allMatches(parametersLine);

  var parameters = <String>[];

  var endPos = 0;
  for (var match in matches) {
    if (match.start != endPos) {
      throw ArgumentError("Can't parse parameters line: $parametersLine");
    }

    var param = match.group(1)!.trim();
    parameters.add(param);
  }

  return parameters;
}