mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 19:56:44 +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
|
|
@ -35,7 +35,7 @@ macro_rules! transform_xy {
|
|||
#[cfg(feature = "dsl")]
|
||||
impl<'state, E: Output + 'state, T: ViewContext<'state, E>> TryFromDsl<'state, T>
|
||||
for $Enum<RenderBox<'state, E>> {
|
||||
fn try_from_expr <'source: 'state> (state: &'state T, iter: TokenIter<'source>)
|
||||
fn try_from_expr <'source: 'state> (state: &'state T, iter: &mut TokenIter<'source>)
|
||||
-> Option<Self>
|
||||
{
|
||||
let mut iter = iter.clone();
|
||||
|
|
@ -88,7 +88,7 @@ macro_rules! transform_xy_unit {
|
|||
#[cfg(feature = "dsl")]
|
||||
impl<'state, E: Output + 'state, T: ViewContext<'state, E>> TryFromDsl<'state, T>
|
||||
for $Enum<E::Unit, RenderBox<'state, E>> {
|
||||
fn try_from_expr <'source: 'state> (state: &'state T, iter: TokenIter<'source>) -> Option<Self> {
|
||||
fn try_from_expr <'source: 'state> (state: &'state T, iter: &mut TokenIter<'source>) -> Option<Self> {
|
||||
let mut iter = iter.clone();
|
||||
if let Some(Token { value: Value::Key(k), .. }) = iter.peek() {
|
||||
if k == $x || k == $y {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue