pub fn check_syntax(language_tag: &str, source: &str) -> Result<(), SyntaxError>Expand description
Checks the syntax of source for the given language tag or name.
Returns Ok(()) if the syntax is valid, if the language is unknown, or if
its parser is not compiled into this build (see Language::is_supported
and the crate features), or Err(SyntaxError) if a syntax error is
discovered.
ยงErrors
Returns SyntaxError if the source code contains syntax or parse errors.