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
|
|
@ -90,7 +90,7 @@ impl ExposeImpl {
|
|||
match dsl.key()? {
|
||||
Some("true") => Ok(Some(true)),
|
||||
Some("false") => Ok(Some(false)),
|
||||
_ => match dsl.sym()? { #(#variants)* _ => Ok(None) }
|
||||
_ => match dsl.word()? { #(#variants)* _ => Ok(None) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -102,7 +102,7 @@ impl ExposeImpl {
|
|||
fn from_dsl (state: &#state, dsl: &impl Dsl) -> Perhaps<Self> {
|
||||
match dsl.num()? {
|
||||
Some(n) => Ok(Some(n.parse::<#t>()?)),
|
||||
_ => match dsl.sym()? { #(#variants)* _ => Ok(None) }
|
||||
_ => match dsl.word()? { #(#variants)* _ => Ok(None) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -112,7 +112,7 @@ impl ExposeImpl {
|
|||
/// Generated by [tengri_proc::expose].
|
||||
impl ::tengri::dsl::FromDsl<#state> for #t {
|
||||
fn from_dsl (state: &#state, dsl: &impl Dsl) -> Perhaps<Self> {
|
||||
match dsl.sym()? { #(#variants)* _ => Ok(None) }
|
||||
match dsl.word()? { #(#variants)* _ => Ok(None) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue