check method

void check(
  1. CodeUnit codeUnit
)

Implementation

void check(CodeUnit codeUnit) {
  if (!acceptsLanguage(codeUnit.language)) {
    throw StateError(
        "This parser is for the language '$language'. Trying to parse a CodeUnit of language: '${codeUnit.language}'");
  }
}