feat: without root

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2023-09-26 22:37:12 +02:00
parent cd4cd35d0c
commit adee7503c5
Signed by: kjuulh
GPG Key ID: 9AA7BC13CE474394
2 changed files with 63 additions and 64 deletions

View File

@ -62,11 +62,9 @@ impl Node {
}
quote! {
pub mod $(&self.segment) {
$(for tokens in child_tokens join ($['\r']) => $tokens)
}
}
}
fn traverse_indent(&self, indent: usize) -> genco::lang::rust::Tokens {
tracing::trace!("node traverse visited: {}", self.segment);

View File

@ -1,4 +1,3 @@
pub mod root {
pub mod basic {
pub mod includes {
pub mod my_include {
@ -14,7 +13,8 @@ pub mod root {
where
Self: Sized,
{
let output = Self::decode(raw.as_slice()).map_err(|e| ::crunch::errors::DeserializeError::ProtoErr(e))?;
let output = Self::decode(raw.as_slice())
.map_err(|e| ::crunch::errors::DeserializeError::ProtoErr(e))?;
Ok(output)
}
}
@ -43,7 +43,8 @@ pub mod root {
where
Self: Sized,
{
let output = Self::decode(raw.as_slice()).map_err(|e| ::crunch::errors::DeserializeError::ProtoErr(e))?;
let output = Self::decode(raw.as_slice())
.map_err(|e| ::crunch::errors::DeserializeError::ProtoErr(e))?;
Ok(output)
}
}
@ -73,7 +74,8 @@ pub mod root {
where
Self: Sized,
{
let output = Self::decode(raw.as_slice()).map_err(|e| ::crunch::errors::DeserializeError::ProtoErr(e))?;
let output = Self::decode(raw.as_slice())
.map_err(|e| ::crunch::errors::DeserializeError::ProtoErr(e))?;
Ok(output)
}
}
@ -89,4 +91,3 @@ pub mod root {
}
}
}
}