mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-07 04:06:48 +01:00
wip: directionalize!
can't fit all into 1 trait because of directionality of trait implementation rules and constraints :(
This commit is contained in:
parent
f797a7143d
commit
7c1cddc759
10 changed files with 221 additions and 222 deletions
|
|
@ -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 })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue