pub fn parser_for_language(
language: Language,
extension: Option<&str>,
) -> Option<Box<dyn LanguageParser>>Expand description
Select a parser by an explicit language and an optional compatible
extension. The language is authoritative: a .ts extension cannot turn
an explicitly selected JavaScript parser into TypeScript (and vice versa).