mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 11:46:42 +01:00
proc: auto implement Context on command target
Context and TryFromDsl overlap
This commit is contained in:
parent
3bb38f2d27
commit
20ccff13de
5 changed files with 17 additions and 13 deletions
|
|
@ -29,7 +29,7 @@ impl<'state, S, C: DslCommand<'state, S>, I: DslInput> KeyMap<'state, S, C, I> f
|
|||
match exp_iter.next() {
|
||||
Some(Token { value: Value::Sym(binding), .. }) => {
|
||||
if input.matches_dsl(binding) {
|
||||
if let Some(command) = C::try_from_expr(state, exp_iter.clone()) {
|
||||
if let Some(command) = C::try_from_expr(state, &mut exp_iter) {
|
||||
return Some(command)
|
||||
}
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ impl<'state, S, C: DslCommand<'state, S>, I: DslInput> KeyMap<'state, S, C, I> f
|
|||
match exp_iter.next() {
|
||||
Some(Token { value: Value::Sym(binding), .. }) => {
|
||||
if input.matches_dsl(binding) {
|
||||
if let Some(command) = C::try_from_expr(state, exp_iter.clone()) {
|
||||
if let Some(command) = C::try_from_expr(state, &mut exp_iter) {
|
||||
return Some(command)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue