cl-parser: Transliterate to a trait-based parsing implementation

Bump version number.
This commit is contained in:
2024-07-31 01:39:00 -05:00
parent 388a69948e
commit 97808fd855
10 changed files with 613 additions and 545 deletions

View File

@@ -1,5 +1,6 @@
//! Pretty prints a conlang AST in yaml
use cl_ast::Stmt;
use cl_lexer::Lexer;
use cl_parser::Parser;
use repline::{error::Error as RlError, Repline};
@@ -19,7 +20,7 @@ fn main() -> Result<(), Box<dyn Error>> {
};
let mut parser = Parser::new(Lexer::new(&line));
let code = match parser.stmt() {
let code = match parser.parse::<Stmt>() {
Ok(code) => {
rl.accept();
code