You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Use actual zig.zyn pattern for custom types example
Show the real "define": "primitive_type" pattern from zig.zyn.
Be honest that grammar only parses type names - type semantics
must be handled in the compiler/runtime, not in grammar actions.
The type mapping (Currency → f64, Date → i64) happens during compilation. Your DSL plugin can validate and transform types as needed. This allows DSL code like:
591
-
592
-
```text
593
-
let price: Currency = 99.99
594
-
let discount: Percentage = 15
595
-
let created: Date = now()
596
-
let timeout: Duration = 5000
597
-
```
576
+
Note: The grammar only parses type names as strings. Type semantics (e.g., treating `Currency` as `f64`) must be handled in your compiler or runtime, not in the grammar.
0 commit comments