extact dsl_token; flip Dsl; try to obviate ViewContext

This commit is contained in:
🪞👃🪞 2025-05-20 16:27:05 +03:00
parent f08593f0f8
commit f797a7143d
12 changed files with 264 additions and 209 deletions

View file

@ -40,7 +40,7 @@ macro_rules! transform_xy {
}
#[cfg(feature = "dsl")]
impl<'state, E: Output + 'state, T: ViewContext<'state, E>>
FromDsl<'state, T> for $Enum<RenderBox<'state, E>> {
Dsl<T> for $Enum<RenderBox<'state, E>> {
fn take_from <'source: 'state> (state: &'state T, iter: &mut TokenIter<'source>) -> Perhaps<Self> {
if let Some(Token { value: Value::Key(k), .. }) = iter.peek() {
let mut base = iter.clone();
@ -85,7 +85,7 @@ macro_rules! transform_xy_unit {
}
#[cfg(feature = "dsl")]
impl<'state, E: Output + 'state, T: ViewContext<'state, E>>
FromDsl<'state, T> for $Enum<E::Unit, RenderBox<'state, E>> {
Dsl<T> for $Enum<E::Unit, RenderBox<'state, E>> {
fn take_from <'source: 'state> (state: &'state T, iter: &mut TokenIter<'source>) -> Perhaps<Self> {
Ok(if let Some(Token { value: Value::Key($x|$y|$xy), .. }) = iter.peek() {
let mut base = iter.clone();