Skip to content

Commit

Permalink
Extracted generic StackGraph builder code into metaslang_graph_builder
Browse files Browse the repository at this point in the history
  • Loading branch information
ggiraldez committed Jun 10, 2024
1 parent 54d3b80 commit 4f5cc3c
Show file tree
Hide file tree
Showing 26 changed files with 95 additions and 2,584 deletions.
6 changes: 2 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions crates/codegen/runtime/cargo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ metaslang_cst = { workspace = true }
metaslang_graph_builder = { workspace = true, optional = true }
napi = { workspace = true, optional = true }
napi-derive = { workspace = true, optional = true }
once_cell = { workspace = true, optional = true }
semver = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true, optional = true }
Expand All @@ -36,7 +35,7 @@ cli = ["dep:clap", "dep:serde_json", "__private_ariadne"]
# Only used by the `slang_solidity` CLI
__private_ariadne = ["dep:ariadne"]
# For internal development only
__graph_builder = ["dep:metaslang_graph_builder", "dep:stack-graphs", "dep:once_cell"]
__graph_builder = ["dep:metaslang_graph_builder", "dep:stack-graphs"]

[lints]
workspace = true
12 changes: 11 additions & 1 deletion crates/codegen/runtime/cargo/src/runtime/bindings/mod.rs
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
pub mod stack_graph;
pub mod stack_graph {
use metaslang_graph_builder::stack_graph;
pub use metaslang_graph_builder::stack_graph::{
BuildError, NoCancellation, FILE_PATH_VAR, ROOT_PATH_VAR,
};

use super::super::metaslang_cst::KindTypes;

pub type Builder<'a> = stack_graph::Builder<'a, KindTypes>;
pub type StackGraphLanguage = stack_graph::StackGraphLanguage<KindTypes>;
}
Loading

0 comments on commit 4f5cc3c

Please sign in to comment.