From ebca65ff5ced6333c3f56d5069d3b79c99b95a0e Mon Sep 17 00:00:00 2001 From: rzvxa Date: Sat, 9 Mar 2024 20:45:33 +0330 Subject: [PATCH] chore: add semantic crate. --- Cargo.toml | 5 +++-- crates/fuse-semantic/Cargo.toml | 12 ++++++++++++ crates/fuse-semantic/src/lib.rs | 1 + crates/fusec/Cargo.toml | 3 ++- crates/fusec/src/lib.rs | 6 ++++++ crates/fusec/src/main.rs | 3 --- 6 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 crates/fuse-semantic/Cargo.toml create mode 100644 crates/fuse-semantic/src/lib.rs create mode 100644 crates/fusec/src/lib.rs delete mode 100644 crates/fusec/src/main.rs diff --git a/Cargo.toml b/Cargo.toml index 70f8b3b..d0c6886 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,13 +11,14 @@ license = "MIT" repository = "https://github.com/fuse-lang/fusec" [workspace.dependencies] -# fuse = { version = "0.0.0", path = "crates/fuse" } +fuse = { version = "0.0.0", path = "crates/fuse" } fuse_ast = { version = "0.0.0", path = "crates/fuse-ast" } fuse_codegen = { version = "0.0.0", path = "crates/fuse-codegen" } fuse_common = { version = "0.0.0", path = "crates/fuse-common" } fuse_common_proc = { version = "0.0.0", path = "crates/fuse-common-proc" } fuse_parser = { version = "0.0.0", path = "crates/fuse-parser" } -# fusec = { version = "0.0.0", path = "crates/fusec" } +fuse_semantic = { version = "0.0.0", path = "crates/fuse-semantic" } +fusec = { version = "0.0.0", path = "crates/fusec" } thiserror = { version = "1.0" } serde = { version = "1.0", features = ["derive"] } diff --git a/crates/fuse-semantic/Cargo.toml b/crates/fuse-semantic/Cargo.toml new file mode 100644 index 0000000..9c9f0df --- /dev/null +++ b/crates/fuse-semantic/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "fuse_semantic" +version = "0.0.0" +description.workspace = true +authors.workspace = true +license.workspace = true +repository.workspace = true +edition.workspace = true + +[dependencies] +fuse_ast = { workspace = true } +fuse_common = { workspace = true } diff --git a/crates/fuse-semantic/src/lib.rs b/crates/fuse-semantic/src/lib.rs new file mode 100644 index 0000000..9835f10 --- /dev/null +++ b/crates/fuse-semantic/src/lib.rs @@ -0,0 +1 @@ +pub fn semantic_analysis() {} diff --git a/crates/fusec/Cargo.toml b/crates/fusec/Cargo.toml index c046242..39a7087 100644 --- a/crates/fusec/Cargo.toml +++ b/crates/fusec/Cargo.toml @@ -1,10 +1,11 @@ [package] name = "fusec" +description = "The official compiler for the Fuse programming language." version = "0.0.0" -description.workspace = true authors.workspace = true license.workspace = true repository.workspace = true edition.workspace = true [dependencies] +fuse_parser = { workspace = true } diff --git a/crates/fusec/src/lib.rs b/crates/fusec/src/lib.rs new file mode 100644 index 0000000..6b675bc --- /dev/null +++ b/crates/fusec/src/lib.rs @@ -0,0 +1,6 @@ +use fuse_parser::Parser; + +fn compile_chunk(source: &str) { + let parsed_tree = Parser::new(source).parse(); + todo!("Compiler isn't done yet!") +} diff --git a/crates/fusec/src/main.rs b/crates/fusec/src/main.rs deleted file mode 100644 index 945c6cd..0000000 --- a/crates/fusec/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - todo!("Compiler isn't done yet!") -}