Expand description
Stateful generation Transformers.
§Available Transformers
!
| Transformer | Argument Type | Description |
|---|---|---|
Enumerate | syn::parse::Nothing | Yields an incrementing integer literal on each invocation (stateful). |
§Argument Types
syn::parse::Nothing: No argument required.
§Examples
[< >]:enumerate->0- Calling the same transformer again advances its state:
[< >]:enumerate->1 - Use
enumerateinside another transformer’s argument:[< b c >]:push_left[[[< >]:enumerate]]->0 b c[< b c >]:push_right[[[< >]:enumerate]]->b c 1
Structs§
- Enumerate
- Yields an incrementing integer literal every time it is called.
Functions§
- register
- Inserts all
state-relatedTransformers into the specifiedRegistry.