Skip to content

Commit 050e2f5

Browse files
FAST
1 parent a09ff77 commit 050e2f5

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

DESIGN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ pub trait ParserPlugin {
507507
- Skips FAST-specific runtime attributes (`@click`, `f-ref`, `f-slotted`, `f-children`)
508508
- Emits `Plugin` fragments with u32 LE attribute binding counts
509509
- Tracks components and injects `<f-template>` wrappers at body end
510-
- Converts BTR syntax to FAST syntax: `<if>``<f-when>`, `<for>``<f-repeat>`, `{{expr}}``{expr}` in `:attr` values
510+
- Converts syntax to FAST syntax: `<if>``<f-when>`, `<for>``<f-repeat>`, `{{expr}}``{expr}` in `:attr` values
511511

512512
**Usage:**
513513
```rust

crates/webui-parser/src/plugin/fast.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! FAST parser plugin for the WebUI parser.
22
//!
33
//! Tracks component definitions during HTML parsing and generates `<f-template>`
4-
//! wrappers at body end. Converts BTR template syntax (`<if>`, `<for>`, `{{}}`)
4+
//! wrappers at body end. Converts WebUI Framework template syntax (`<if>`, `<for>`, `{{}}`)
55
//! into FAST-compatible syntax (`<f-when>`, `<f-repeat>`, `{}`).
66
77
use super::ParserPlugin;
@@ -20,7 +20,7 @@ struct TrackedComponent {
2020
/// Implements the `ParserPlugin` trait for the FAST framework:
2121
/// - Filters FAST-specific runtime binding attributes (`@click`, `f-ref`, etc.)
2222
/// - Tracks components encountered during parsing
23-
/// - Generates `<f-template>` wrappers with converted BTR→FAST syntax at body end
23+
/// - Generates `<f-template>` wrappers with converted FAST syntax at body end
2424
/// - Emits binding attribute counts as `Plugin` protocol fragment data
2525
pub struct FastParserPlugin {
2626
/// Components tracked during parsing, in discovery order.
@@ -118,7 +118,7 @@ impl ParserPlugin for FastParserPlugin {
118118
}
119119
}
120120

121-
/// Convert BTR template syntax to FAST syntax in HTML content.
121+
/// Convert WebUI Framework template syntax to FAST syntax in HTML content.
122122
///
123123
/// Performs the following transformations without regex:
124124
/// - `<if condition="EXPR">` → `<f-when value="{EXPR}">`
@@ -655,7 +655,7 @@ mod tests {
655655
assert_eq!(output.matches("<f-template name=\"my-card\">").count(), 1);
656656
}
657657

658-
// --- BTR→FAST syntax conversion ---
658+
// --- FAST syntax conversion ---
659659

660660
#[test]
661661
fn convert_if_to_f_when() {

docs/guide/concepts/plugins/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ During `webui build --plugin=fast`, the parser plugin:
6868
- **Skips framework attributes**: `@click`, `f-ref`, `f-slotted`, `f-children` are removed from the protocol (they're handled client-side)
6969
- **Counts dynamic bindings**: Emits binding counts per element as `Plugin` fragments for the handler
7070
- **Tracks components**: Records all custom elements discovered during parsing
71-
- **Injects `<f-template>` wrappers**: At `</body>`, injects template wrappers for each component with BTR→FAST syntax conversion
71+
- **Injects `<f-template>` wrappers**: At `</body>`, injects template wrappers for each component with FAST syntax conversion
7272

7373
#### Syntax Conversion
7474

examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The `--plugin=fast` flag enables two things:
5858
1. **Parser plugin (`FastParserPlugin`)** — During `webui build`:
5959
- Skips FAST-specific runtime attributes (`@click`, `f-ref`, `f-slotted`, `f-children`)
6060
- Counts dynamic attribute bindings per element and emits `Plugin` protocol fragments
61-
- Tracks components and injects `<f-template name="...">` wrappers at `</body>` with BTR→FAST syntax conversion (`<if>``<f-when>`, `<for>``<f-repeat>`)
61+
- Tracks components and injects `<f-template name="...">` wrappers at `</body>` with FAST syntax conversion (`<if>``<f-when>`, `<for>``<f-repeat>`)
6262

6363
2. **Handler plugin (`FastHydrationPlugin`)** — During rendering:
6464
- Wraps signals, for-loops, and if-conditions in `<!--fe-b$$...-->` comment markers

0 commit comments

Comments
 (0)