Struct cranelift_isle::lexer::Lexer [−][src]
pub struct Lexer<'a> {
pub filenames: Vec<Arc<str>>,
pub file_texts: Vec<Arc<str>>,
// some fields omitted
}
Expand description
The lexer.
Breaks source text up into a sequence of tokens (with source positions).
Fields
filenames: Vec<Arc<str>>
Arena of filenames from the input source.
Indexed via Pos::file
.
file_texts: Vec<Arc<str>>
Arena of file source texts.
Indexed via Pos::file
.
Implementations
Create a new lexer for the given source contents and filename.
pub fn from_files<P>(
file_paths: impl IntoIterator<Item = P>
) -> Result<Lexer<'a>> where
P: AsRef<Path>,
pub fn from_files<P>(
file_paths: impl IntoIterator<Item = P>
) -> Result<Lexer<'a>> where
P: AsRef<Path>,
Create a new lexer from the given files.
Get the next token from this lexer’s token stream, if any.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Lexer<'a>
impl<'a> UnwindSafe for Lexer<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more