20: Parser Implementation (4)
2018/11/4
I am thinking what is the next step. Probably looks like:
sql/parser.rs
fn parse(&self) {
let mut iter = self.tokens.iter();
let category = iter.next().unwrap().token;
match category {
Token::CreateDatabase => {}
Token::CreateTable => {}
// ...
// ...
_ => {}
}
}
sql/create.rs
struct CreateDatabase {
// ...
}
struct CreateTable {
// ...
}