parseResult method

SchemaParseResult parseResult(
  1. String source
)

Parses raw schema source tolerantly.

Collects all parse errors without throwing. The returned SchemaParseResult contains both the (possibly partial) SchemaDocument and every SchemaParseError encountered.

Implementation

SchemaParseResult parseResult(String source) {
  final tokens = const SchemaLexer().tokenize(source);
  final state = _ParserState(tokens);
  return state.parseDocument();
}