mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 03:36:42 +01:00
dsl: exp -> expr, sym -> word
This commit is contained in:
parent
cf253c28f9
commit
ddd162f225
8 changed files with 330 additions and 325 deletions
|
|
@ -511,7 +511,7 @@ transform_xy_unit!("padding/x" "padding/y" "padding/xy"|self: Padding, area|{
|
|||
|
||||
///// The syntagm `(when :condition :content)` corresponds to a [When] layout element.
|
||||
//impl<S, A> FromDsl<S> for When<A> where bool: FromDsl<S>, A: FromDsl<S> {
|
||||
//fn try_provide (state: &S, source: &DslVal<impl DslStr, impl DslExp>) -> Perhaps<Self> {
|
||||
//fn try_provide (state: &S, source: &DslVal<impl DslStr, impl DslExpr>) -> Perhaps<Self> {
|
||||
//source.exp_match("when", |_, tail|Ok(Some(Self(
|
||||
//FromDsl::<S>::provide(state,
|
||||
//tail.nth(0, ||"no condition".into())?, ||"no condition".into())?,
|
||||
|
|
@ -522,7 +522,7 @@ transform_xy_unit!("padding/x" "padding/y" "padding/xy"|self: Padding, area|{
|
|||
//}
|
||||
///// The syntagm `(either :condition :content1 :content2)` corresponds to an [Either] layout element.
|
||||
//impl<S, A, B> FromDsl<S> for Either<A, B> where S: Eval<Ast, bool> + Eval<Ast, A> + Eval<Ast, B> {
|
||||
//fn try_provide (state: &S, source: &DslVal<impl DslStr, impl DslExp>) -> Perhaps<Self> {
|
||||
//fn try_provide (state: &S, source: &DslVal<impl DslStr, impl DslExpr>) -> Perhaps<Self> {
|
||||
//source.exp_match("either", |_, tail|Ok(Some(Self(
|
||||
//state.eval(tail.nth(0, ||"no condition")?, ||"no condition")?,
|
||||
//state.eval(tail.nth(1, ||"no content 1")?, ||"no content 1")?,
|
||||
|
|
@ -533,7 +533,7 @@ transform_xy_unit!("padding/x" "padding/y" "padding/xy"|self: Padding, area|{
|
|||
///// The syntagm `(align/* :content)` corresponds to an [Align] layout element,
|
||||
///// where `*` specifies the direction of the alignment.
|
||||
//impl<S, A> FromDsl<S> for Align<A> where S: Eval<Option<Ast>, A> {
|
||||
//fn try_provide (state: &S, source: &DslVal<impl DslStr, impl DslExp>) -> Perhaps<Self> {
|
||||
//fn try_provide (state: &S, source: &DslVal<impl DslStr, impl DslExpr>) -> Perhaps<Self> {
|
||||
//source.exp_match("align/", |head, tail|Ok(Some(match head {
|
||||
//"c" => Self::c(state.eval(tail.nth(0, ||"no content")?, ||"no content")),
|
||||
//"x" => Self::x(state.eval(tail.nth(0, ||"no content")?, ||"no content")),
|
||||
|
|
@ -553,7 +553,7 @@ transform_xy_unit!("padding/x" "padding/y" "padding/xy"|self: Padding, area|{
|
|||
///// The syntagm `(bsp/* :content1 :content2)` corresponds to a [Bsp] layout element,
|
||||
///// where `*` specifies the direction of the split.
|
||||
//impl<S, A, B> FromDsl<S> for Bsp<A, B> where S: Eval<Option<Ast>, A> + Eval<Option<Ast>, B> {
|
||||
//fn try_provide (state: &S, source: &DslVal<impl DslStr, impl DslExp>) -> Perhaps<Self> {
|
||||
//fn try_provide (state: &S, source: &DslVal<impl DslStr, impl DslExpr>) -> Perhaps<Self> {
|
||||
//source.exp_match("bsp/", |head, tail|Ok(Some(match head {
|
||||
//"n" => Self::n(tail.nth(0, ||"no content 1"), tail.nth(1, ||"no content 2")),
|
||||
//"s" => Self::s(tail.nth(0, ||"no content 1"), tail.nth(1, ||"no content 2")),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue