diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-10 22:41:56 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-10 22:41:56 +0200 |
| commit | c216a4fc26c72938ddad60bc5fe4fa9e45263b30 (patch) | |
| tree | 0a563e3076a8d0724d0361b5d81a2b8d07d15cbe /src/syntax | |
| parent | 51bf3268ddf5db1bdd61e59bfb4a30f0463a4bfb (diff) | |
Flatten ast module back into syntax module 🌪
Diffstat (limited to 'src/syntax')
| -rw-r--r-- | src/syntax/ast/mod.rs | 14 | ||||
| -rw-r--r-- | src/syntax/expr.rs (renamed from src/syntax/ast/expr.rs) | 0 | ||||
| -rw-r--r-- | src/syntax/lit.rs (renamed from src/syntax/ast/lit.rs) | 0 | ||||
| -rw-r--r-- | src/syntax/mod.rs | 14 | ||||
| -rw-r--r-- | src/syntax/node.rs (renamed from src/syntax/ast/node.rs) | 0 |
5 files changed, 10 insertions, 18 deletions
diff --git a/src/syntax/ast/mod.rs b/src/syntax/ast/mod.rs deleted file mode 100644 index 60a958a4..00000000 --- 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<SynNode>; diff --git a/src/syntax/ast/expr.rs b/src/syntax/expr.rs index 09729f52..09729f52 100644 --- a/src/syntax/ast/expr.rs +++ b/src/syntax/expr.rs diff --git a/src/syntax/ast/lit.rs b/src/syntax/lit.rs index 40b360da..40b360da 100644 --- a/src/syntax/ast/lit.rs +++ b/src/syntax/lit.rs diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs index 8b716da4..81702201 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<SynNode>; diff --git a/src/syntax/ast/node.rs b/src/syntax/node.rs index 102ef3b5..102ef3b5 100644 --- a/src/syntax/ast/node.rs +++ b/src/syntax/node.rs |
