slex 0.2.4

A simple lexer for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[cfg(test)]
mod tests;

pub mod error;
pub mod indent_lexer;
pub mod lexer;
pub mod tokens;

pub fn lex(input: String) -> Result<Vec<error::Located<tokens::Token>>, error::Error> {
    lexer::Lexer::new(input).lex()
}
pub fn lex_indent(input: String) -> Result<Vec<indent_lexer::Line>, error::Error> {
    indent_lexer::Lexer::new(input).lex()
}