mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 03:36:42 +01:00
This commit is contained in:
parent
17506726cb
commit
c8827b43c3
9 changed files with 114 additions and 135 deletions
|
|
@ -64,7 +64,9 @@ impl ToTokens for ViewDef {
|
|||
/// which might correspond to a given [TokenStream],
|
||||
/// while taking [#self_ty]'s state into consideration.
|
||||
impl<'state> ::tengri::dsl::Dsl<Box<dyn Render<#output> + 'state>> for #self_ty {
|
||||
fn try_provide (state: &'state #self_ty, mut words: ::tengri::dsl::Ast) -> Perhaps<Box<dyn Render<#output> + 'state>> {
|
||||
fn try_provide (state: &'state #self_ty, mut words: ::tengri::dsl::Ast) ->
|
||||
Perhaps<Box<dyn Render<#output> + 'state>>
|
||||
{
|
||||
Ok(if let Some(::tengri::dsl::Token { value, .. }) = words.peek() {
|
||||
match value { #(#builtin)* #(#exposed)* _ => None }
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue