Parser Implementation (4)
- 2018-10-24
- Liu, An-Chi 劉安齊
I am thinking what is the next step. Probably looks like:
!FILENAME sql/parser.rs
fn parse(&self) {
let mut iter = self.tokens.iter();
let category = iter.next().unwrap().token;
match category {
Token::CreateDatabase => {}
Token::CreateTable => {}
// ...
// ...
_ => {}
}
}
!FILENAME sql/create.rs
struct CreateDatabase {
// ...
}
struct CreateTable {
// ...
}