move parser and add semicolon
This commit is contained in:
parent
c66a193a6e
commit
ce817c9f89
4 changed files with 8 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
pub mod ast;
|
||||
pub mod interpret;
|
||||
pub mod parser;
|
||||
pub mod runtime;
|
||||
|
|
|
|||
2
src/parser/mod.rs
Normal file
2
src/parser/mod.rs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
pub mod parser;
|
||||
pub use parser::*;
|
||||
|
|
@ -47,6 +47,11 @@ fn scan(source: String) -> Vec<LocatedToken> {
|
|||
end: scanner.cursor(),
|
||||
token: Token::Comma,
|
||||
}),
|
||||
';' => tokens.push(LocatedToken {
|
||||
start,
|
||||
end: scanner.cursor(),
|
||||
token: Token::Semicolon,
|
||||
}),
|
||||
'{' => tokens.push(LocatedToken {
|
||||
start,
|
||||
end: scanner.cursor(),
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
pub mod parser;
|
||||
pub mod runtime;
|
||||
pub use runtime::*;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue