lex() function in lexer module
This commit is contained in:
parent
3dd170ec69
commit
bf03cb8ef9
2 changed files with 7 additions and 1 deletions
|
@ -49,6 +49,10 @@ enum NewlineState { N, Ne, New, Newl, Newli, Newlin, Newline }
|
|||
#[derive(Clone, PartialEq, Debug)]
|
||||
enum SpaceState { S, Sp, Spa, Spac, Space }
|
||||
|
||||
pub fn lex(input: &str) -> Lexer {
|
||||
Lexer::new(&input)
|
||||
}
|
||||
|
||||
pub struct Lexer {
|
||||
input: String,
|
||||
begin: usize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue