newParser function

CandidParser newParser(
  1. String contents
)

Implementation

CandidParser newParser(String contents) {
  final input = InputStream.fromString(contents);
  final lexer = CandidLexer(input);
  final tokens = CommonTokenStream(lexer);
  final parser = CandidParser(tokens);
  parser.addErrorListener(DiagnosticErrorListener());
  parser.buildParseTree = true;
  return parser;
}