Skip to main content

Frontend

Trait Frontend 

Source
pub trait Frontend {
    // Required methods
    fn language(&self) -> Language;
    fn frontend_version(&self) -> &'static str;
    fn lex(&self, source: &str) -> LexedFile;
}
Expand description

A Fast-mode lexer for one language.

Required Methods§

Source

fn language(&self) -> Language

The language this frontend lexes.

Source

fn frontend_version(&self) -> &'static str

The frontend’s version tag, used as a fingerprint input.

Source

fn lex(&self, source: &str) -> LexedFile

Lex source into a token stream with unit boundaries and diagnostics.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§