diff --git a/src/parse/tokens.rs b/src/parse/tokens.rs index f53ab586f..3a90e114e 100644 --- a/src/parse/tokens.rs +++ b/src/parse/tokens.rs @@ -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::*; diff --git a/src/syntax/ast/mod.rs b/src/syntax/ast/mod.rs deleted file mode 100644 index 60a958a40..000000000 --- a/src/syntax/ast/mod.rs +++ /dev/null @@ -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; diff --git a/src/syntax/ast/expr.rs b/src/syntax/expr.rs similarity index 100% rename from src/syntax/ast/expr.rs rename to src/syntax/expr.rs diff --git a/src/syntax/ast/lit.rs b/src/syntax/lit.rs similarity index 100% rename from src/syntax/ast/lit.rs rename to src/syntax/lit.rs diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs index 8b716da4c..817022016 100644 --- a/src/syntax/mod.rs +++ b/src/syntax/mod.rs @@ -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; diff --git a/src/syntax/ast/node.rs b/src/syntax/node.rs similarity index 100% rename from src/syntax/ast/node.rs rename to src/syntax/node.rs