lang: basic module syntax grammar
This commit is contained in:
parent
f6da90a354
commit
946ac879a7
7 changed files with 136 additions and 8 deletions
|
@ -2,6 +2,8 @@ use std::fmt::Debug;
|
|||
|
||||
use crate::lst_parser::syntax_kind::SyntaxKind::*;
|
||||
|
||||
use self::module::{mod_body, top_level_item};
|
||||
|
||||
use super::{
|
||||
input::Input,
|
||||
output::Output,
|
||||
|
@ -10,11 +12,13 @@ use super::{
|
|||
};
|
||||
|
||||
mod expression;
|
||||
mod module;
|
||||
|
||||
pub fn source_file(p: &mut Parser) {
|
||||
let root = p.start("root");
|
||||
|
||||
expression::expression(p, false);
|
||||
mod_body(p);
|
||||
// expression::expression(p, false);
|
||||
p.eat_succeeding_ws();
|
||||
|
||||
root.complete(p, ROOT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue