lang: rewrite parser
This commit is contained in:
parent
6d8b79e8f7
commit
381ab45edc
25 changed files with 524 additions and 1161 deletions
14
crates/lang/src/parser/grammar.rs
Normal file
14
crates/lang/src/parser/grammar.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
use crate::parser::syntax_kind::SyntaxKind::*;
|
||||
|
||||
use super::Parser;
|
||||
|
||||
mod expression;
|
||||
|
||||
pub fn source_file(p: &mut Parser) {
|
||||
let root = p.start();
|
||||
|
||||
expression::expression(p);
|
||||
p.eat_succeeding_ws();
|
||||
|
||||
root.complete(p, ROOT);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue