feat: without root
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
cd4cd35d0c
commit
adee7503c5
@ -62,11 +62,9 @@ impl Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
quote! {
|
quote! {
|
||||||
pub mod $(&self.segment) {
|
|
||||||
$(for tokens in child_tokens join ($['\r']) => $tokens)
|
$(for tokens in child_tokens join ($['\r']) => $tokens)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fn traverse_indent(&self, indent: usize) -> genco::lang::rust::Tokens {
|
fn traverse_indent(&self, indent: usize) -> genco::lang::rust::Tokens {
|
||||||
tracing::trace!("node traverse visited: {}", self.segment);
|
tracing::trace!("node traverse visited: {}", self.segment);
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
pub mod root {
|
|
||||||
pub mod basic {
|
pub mod basic {
|
||||||
pub mod includes {
|
pub mod includes {
|
||||||
pub mod my_include {
|
pub mod my_include {
|
||||||
@ -14,7 +13,8 @@ pub mod root {
|
|||||||
where
|
where
|
||||||
Self: Sized,
|
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)
|
Ok(output)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -43,7 +43,8 @@ pub mod root {
|
|||||||
where
|
where
|
||||||
Self: Sized,
|
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)
|
Ok(output)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -73,7 +74,8 @@ pub mod root {
|
|||||||
where
|
where
|
||||||
Self: Sized,
|
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)
|
Ok(output)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -89,4 +91,3 @@ pub mod root {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user