mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 03:36:42 +01:00
FromDsl -> Namespace
This commit is contained in:
parent
455d6d00d5
commit
f714302f21
8 changed files with 33 additions and 32 deletions
|
|
@ -84,7 +84,7 @@ impl ToTokens for CommandDef {
|
|||
let mut out = TokenStream2::new();
|
||||
for (arg, ty) in arm.args() {
|
||||
write_quote_to(&mut out, quote! {
|
||||
#arg: FromDsl::take_from_or_fail(self, words)?,
|
||||
#arg: Namespace::take_from_or_fail(self, words)?,
|
||||
});
|
||||
}
|
||||
out
|
||||
|
|
@ -149,7 +149,7 @@ impl ToTokens for CommandDef {
|
|||
}
|
||||
}
|
||||
/// Generated by [tengri_proc::command].
|
||||
impl<'source> ::tengri::dsl::FromDsl<'source, #state> for #command_enum {
|
||||
impl<'source> ::tengri::dsl::Namespace<'source, #state> for #command_enum {
|
||||
fn take_from <'state> (
|
||||
state: &'state #state,
|
||||
words: &mut ::tengri::dsl::TokenIter<'source>
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ impl ToTokens for ExposeImpl {
|
|||
let values = variants.iter().map(ExposeArm::from);
|
||||
write_quote_to(out, quote! {
|
||||
/// Generated by [tengri_proc::expose].
|
||||
impl<'source> ::tengri::dsl::FromDsl<'source, #state> for #t {
|
||||
impl<'source> ::tengri::dsl::Namespace<'source, #state> for #t {
|
||||
fn take_from <'state> (
|
||||
state: &'state #state,
|
||||
words: &mut ::tengri::dsl::TokenIter<'source>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ impl ToTokens for ViewDef {
|
|||
/// Gives [#view] the ability to construct the [Render]able
|
||||
/// which might corresponds to a given [TokenStream],
|
||||
/// while taking [#view]'s state into consideration.
|
||||
impl<'source> ::tengri::dsl::FromDsl<'source, #view> for Box<dyn Render<#output> + 'source> {
|
||||
impl<'source> ::tengri::dsl::Namespace<'source, #view> for Box<dyn Render<#output> + 'source> {
|
||||
fn take_from <'state> (
|
||||
state: &'state #view,
|
||||
words: &mut ::tengri::dsl::TokenIter<'source>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue