Jez and Andy write a Parser
September 26, 2025 [Programming, Programming Languages, Rust, Tech, Videos]My friend Jez is back, and we make a start on a parser for the Cell language (in Rust, of course).
You can find Jez at jezuk.co.uk and follow him at @jezhiggins@mastodon.me.uk.
Soon after we finished recording, Jez reported to me that he'd got it passing all tests, and provided this code snippet:
fn next_node(&mut self, prev: Option<AST>) -> Option<AST> {
match self.next_token() {
Some(token) => self.build_node(token, prev),
None => prev.and(make_ast_error("Hit end of file - expected ';'.")),
}
}