mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 19:56:44 +01:00
This commit is contained in:
parent
21832453d9
commit
17506726cb
36 changed files with 280 additions and 271 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: Take::take_or_fail(self, words)?,
|
||||
#arg: Dsl::try_provide(self, words)?,
|
||||
});
|
||||
}
|
||||
out
|
||||
|
|
@ -149,8 +149,8 @@ impl ToTokens for CommandDef {
|
|||
}
|
||||
}
|
||||
/// Generated by [tengri_proc::command].
|
||||
impl ::tengri::dsl::Take<#state> for #command_enum {
|
||||
fn take (state: &#state, mut words: ::tengri::dsl::Cst) -> Perhaps<Self> {
|
||||
impl ::tengri::dsl::Dsl<#state> for #command_enum {
|
||||
fn try_provide (state: &#state, mut words: ::tengri::dsl::Ast) -> Perhaps<Self> {
|
||||
let mut words = words.clone();
|
||||
let token = words.next();
|
||||
todo!()//Ok(match token { #(#matchers)* _ => None })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue