mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 11:46:42 +01:00
dsl: Provide -> Take, Receive -> Give (swap + shorten)
This commit is contained in:
parent
583660c330
commit
ddf0c05d5f
10 changed files with 64 additions and 55 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: Provide::provide_or_fail(self, words)?,
|
||||
#arg: Take::provide_or_fail(self, words)?,
|
||||
});
|
||||
}
|
||||
out
|
||||
|
|
@ -149,7 +149,7 @@ impl ToTokens for CommandDef {
|
|||
}
|
||||
}
|
||||
/// Generated by [tengri_proc::command].
|
||||
impl<'n> ::tengri::dsl::Provide<'n, #state> for #command_enum {
|
||||
impl<'n> ::tengri::dsl::Take<'n, #state> for #command_enum {
|
||||
fn provide <'source> (
|
||||
state: &#state,
|
||||
words: &mut ::tengri::dsl::TokenIter<'source>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue