pub trait Reader: Send + Sync {
// Required methods
fn language(&self) -> &'static str;
fn extensions(&self) -> &'static [&'static str];
fn read(&self, source: &str) -> Result<Program, ReadError>;
}Expand description
A reader parses source code into the surface-syntax IR.
Required Methods§
Sourcefn extensions(&self) -> &'static [&'static str]
fn extensions(&self) -> &'static [&'static str]
File extensions this reader handles (e.g., &[“ts”, “tsx”]).