check method
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}'");
}
}