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
Matching/templating: Improve flag parsing, multitemplate parsing, naming (allow->chars, lower/upper aliases), or_var -> or-var, map_default -> map-default, schema parsing, and better error messages. Yet to complete template expressions that map/allow/validate, proper two way flag sharing, and making the equals/allow/only stuff symmetrical.
Copy file name to clipboardExpand all lines: simplify.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Analyze the existing matching tests, and add a test for failures so we know how
19
19
***Argument Parsing:**
20
20
* Matching: Complex type detection (`GetArgType`), `CharacterClass` parsing, diverse argument types (`[...]`, `a|b|c`).
21
21
* Templating: Simpler string arguments, specific escaping (`\(\)\,`), comma delimiter default, pipe delimiter (`|`) for `equals`.
22
-
***Optionality:** Different syntax and slightly different semantics (`:?` in matching vs. `:?`/`:optional`/`:default`/`:or_var` in templating).
22
+
***Optionality:** Different syntax and slightly different semantics (`:?` in matching vs. `:?`/`:optional`/`:default`/`:or-var` in templating).
23
23
***Query Keys:** Literals only in matching; can contain variables in templating.
24
24
***Segment Boundaries:** Core concept in matching (`SegmentBoundary` influencing capture start/end); irrelevant in templating.
25
25
@@ -50,15 +50,15 @@ Analyze the existing matching tests, and add a test for failures so we know how
50
50
51
51
***Proposal:** Standardize on `:?` (and `:optional` as an alias) in both syntaxes where the concept applies.
52
52
***Matching:** Maintain existing `:?` behavior.
53
-
***Templating:** Consolidate `:?` and `:optional` to one form. Note that `:default` and `:or_var` still imply optional *handling* (suppressing output on null/empty) which is distinct from the marker itself.
53
+
***Templating:** Consolidate `:?` and `:optional` to one form. Note that `:default` and `:or-var` still imply optional *handling* (suppressing output on null/empty) which is distinct from the marker itself.
54
54
***Impact:** Minor syntax cleanup and improved consistency.
55
55
56
56
### D. Naming Alignment (Conditions vs. Transforms)
57
57
58
58
***Proposal:** Align names where functionality clearly overlaps, potentially using aliases.
59
59
* Examine `allow`/`only` (matching) vs. `equals` (templating). Direct replacement is hard due to `CharacterClass` vs. string array arguments. Consider adding an `equals(a|b|c)` condition to matching for parity?
60
-
* Keep distinct names for clearly different concepts (`or_var`, `map`, `default`).
61
-
* Ensure `map_default` (formerly `other`) is consistently named.
60
+
* Keep distinct names for clearly different concepts (`or-var`, `map`, `default`).
61
+
* Ensure `map-default` (formerly `other`) is consistently named.
62
62
***Impact:** Improved clarity, primarily in documentation and code readability. Requires careful analysis of any subtle behavioral differences.
0 commit comments