Flatten ast module back into syntax module 🌪

This commit is contained in:
Laurenz 2020-10-10 22:41:56 +02:00
parent 51bf3268dd
commit c216a4fc26
6 changed files with 11 additions and 20 deletions

View File

@ -4,8 +4,7 @@ use std::fmt::{self, Debug, Formatter};
use super::{is_newline, Scanner};
use crate::geom::Unit;
use crate::syntax::token::*;
use crate::syntax::{is_ident, Pos};
use crate::syntax::*;
use TokenMode::*;

View File

@ -1,14 +0,0 @@
//! Abstract syntax tree definition.
mod expr;
mod lit;
mod node;
pub use expr::*;
pub use lit::*;
pub use node::*;
use super::{Ident, SpanVec, Spanned};
/// A collection of nodes which form a tree together with the nodes' children.
pub type SynTree = SpanVec<SynNode>;

View File

@ -1,12 +1,18 @@
//! Syntax types.
pub mod ast;
pub mod token;
mod expr;
mod ident;
mod lit;
mod node;
mod span;
mod token;
pub use ast::*;
pub use expr::*;
pub use ident::*;
pub use lit::*;
pub use node::*;
pub use span::*;
pub use token::*;
/// A collection of nodes which form a tree together with the nodes' children.
pub type SynTree = SpanVec<SynNode>;