wip: directionalize!

can't fit all into 1 trait because of directionality
of trait implementation rules and constraints :(
This commit is contained in:
🪞👃🪞 2025-05-20 18:48:55 +03:00
parent f797a7143d
commit 7c1cddc759
10 changed files with 221 additions and 222 deletions

View file

@ -144,12 +144,11 @@ impl ToTokens for CommandDef {
}
}
/// Generated by [tengri_proc].
impl ::tengri::dsl::Dsl<#command_enum> for #state {
fn take <'source, 'state> (
&'state self, words: &mut TokenIter<'source>
)
-> ::tengri::Perhaps<#command_enum>
{
impl ::tengri::dsl::FromDsl<#state> for #command_enum {
fn take_from <'state, 'source: 'state> (
state: &'state #state,
words: &mut TokenIter<'source>,
) -> Perhaps<Self> {
let mut words = words.clone();
let token = words.next();
todo!()//Ok(match token { #(#matchers)* _ => None })