chore: 0.0.7: bump deps & light code cleanup
This commit is contained in:
parent
996f1e46a5
commit
4dfcb2646a
2 changed files with 601 additions and 2114 deletions
|
|
@ -1,29 +1,29 @@
|
|||
[package]
|
||||
name = "sabry_build"
|
||||
description = "Sabry build magic as a separate crate"
|
||||
version.workspace = true
|
||||
repository.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
authors.workspace = true
|
||||
description = "Sabry build magic as a separate crate"
|
||||
repository.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[dependencies]
|
||||
sabry_intrnl.workspace = true
|
||||
sabry_intrnl.features = ["compile", "scope"]
|
||||
sabry_procmacro_impl.workspace = true
|
||||
sabry_procmacro_impl.features = ["const-compile"]
|
||||
|
||||
syn.workspace = true
|
||||
syn.features = ["visit", "derive", "parsing", "full"]
|
||||
proc-macro2.workspace = true
|
||||
proc-macro2.features = ["span-locations"]
|
||||
syn.workspace = true
|
||||
syn.features = ["derive", "full", "parsing", "visit"]
|
||||
thiserror.workspace = true
|
||||
walkdir.workspace = true
|
||||
|
||||
[features]
|
||||
net-files = []
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
|
|
|||
|
|
@ -50,14 +50,19 @@ impl<'ast> Visit<'ast> for StylyVisitor {
|
|||
node.mac.span()
|
||||
)
|
||||
});
|
||||
let macro_data =
|
||||
styly::parse_macro_syntax(body, self.path.parent().map(|p| p.to_owned()))
|
||||
.unwrap_or_else(|e| {
|
||||
panic!(
|
||||
"could not parse `styly!` macro at {:?}: {e:?}",
|
||||
node.mac.span()
|
||||
)
|
||||
});
|
||||
let source_path = self.path.parent().unwrap_or_else(|| {
|
||||
panic!(
|
||||
"could not find source_file at {:?}: none parent exists",
|
||||
node.mac.span()
|
||||
)
|
||||
});
|
||||
let macro_data = styly::parse_macro_syntax(body, source_path.to_owned())
|
||||
.unwrap_or_else(|e| {
|
||||
panic!(
|
||||
"could not parse `styly!` macro at {:?}: {e:?}",
|
||||
node.mac.span()
|
||||
)
|
||||
});
|
||||
self.found_stylys.push(macro_data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue