aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJJ2023-10-31 09:49:41 +0000
committerJJ2023-10-31 09:50:21 +0000
commit1c14500ed698f1dc21b4b634a174af89b6318b07 (patch)
tree9dad300eec0585e6ee0d41cd0f8740da2e269a28
parent87d74952a614daa7075aeecef462ff51c4dc46e0 (diff)
compiler: restructure codebase
-rw-r--r--src/frontend/ast.rs (renamed from src/ast.rs)0
-rw-r--r--src/frontend/lex.rs (renamed from src/lex.rs)0
-rw-r--r--src/frontend/mod.rs3
-rw-r--r--src/frontend/parse.rs (renamed from src/parse.rs)10
-rw-r--r--src/main.rs5
5 files changed, 9 insertions, 9 deletions
diff --git a/src/ast.rs b/src/frontend/ast.rs
index 6c7963e..6c7963e 100644
--- a/src/ast.rs
+++ b/src/frontend/ast.rs
diff --git a/src/lex.rs b/src/frontend/lex.rs
index 771ba38..771ba38 100644
--- a/src/lex.rs
+++ b/src/frontend/lex.rs
diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs
new file mode 100644
index 0000000..d437c73
--- /dev/null
+++ b/src/frontend/mod.rs
@@ -0,0 +1,3 @@
+pub mod ast;
+pub mod lex;
+pub mod parse;
diff --git a/src/parse.rs b/src/frontend/parse.rs
index 1dabd47..c525982 100644
--- a/src/parse.rs
+++ b/src/frontend/parse.rs
@@ -1,10 +1,10 @@
use std::fmt;
-use crate::lex::*;
-use crate::ast::*;
-use crate::ast::Binding::*;
-use crate::ast::Control::*;
-use crate::ast::Pattern::*;
+use crate::frontend::lex::*;
+use crate::frontend::ast::*;
+use crate::frontend::ast::Binding::*;
+use crate::frontend::ast::Control::*;
+use crate::frontend::ast::Pattern::*;
use Token::*;
use Literal::*;
use Punctuation::*;
diff --git a/src/main.rs b/src/main.rs
index 7b635f9..d7c995c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,9 +1,6 @@
#![allow(non_upper_case_globals)]
#![feature(exclusive_range_pattern, let_chains)]
-mod ast;
-mod lex;
-mod parse;
-mod tree;
+mod frontend;
fn main() {}