Trait Language
Source pub trait Language {
// Required methods
fn name(&self) -> String;
fn init(&self, x: &mut LexerContext) -> Result<(), Error>;
// Provided method
fn names(&self) -> Vec<String> { ... }
}
Expand description
A language implementation for Highlighter.
Returns the name of the programming language.
Initializes the programming language.
Returns all of the aliases of the programming language.
For example:
vec!["js".to_owned(), "javascript".to_owned(), "jscript".to_owned(), "es".to_owned(), "ecmascript".to_owned()];