mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 11:46:42 +01:00
dsl: InputLayerCond; collect macros
This commit is contained in:
parent
0d4ba4a54e
commit
3df1938626
6 changed files with 121 additions and 110 deletions
|
|
@ -27,14 +27,14 @@ use crate::*;
|
|||
#[cfg(feature = "dsl")]
|
||||
pub struct View<'a, T>(
|
||||
pub &'a T,
|
||||
pub SourceIter<'a>
|
||||
pub TokenIter<'a>
|
||||
);
|
||||
|
||||
#[cfg(feature = "dsl")]
|
||||
impl<'a, O: Output + 'a, T: ViewContext<'a, O>> Content<O> for View<'a, T> {
|
||||
fn content (&self) -> impl Render<O> {
|
||||
let iter = self.1.clone();
|
||||
while let Some((Token { value, .. }, _)) = iter.next() {
|
||||
let mut iter = self.1.clone();
|
||||
while let Some(Token { value, .. }) = iter.next() {
|
||||
if let Some(content) = self.0.get_content(&value) {
|
||||
return Some(content)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue