parse method

void parse (Function parseFunction)

Wrapper function, called with the specialized parseFunction

Implementation

void parse(Function parseFunction) {
  try {
    final int i = parsers.parserInput.i;
    parseFunction();
    if (!parsers.parserInput.end().isFinished) isError = true;
    if (result.isNotEmpty && result.first is Node) {
      result[0]
        ..index = i + index
        ..currentFileInfo = fileInfo;
    }
  } catch (e) {
    isError = true;
    if (e is LessExceptionError) e.error.index += index;
    throw LessExceptionError(
        LessError.transform(e, filename: fileInfo.filename));
  }
}