feat: pattern bindings, empty closures, match-as-expr, string interp
Sessions 10–12 from QUALITY_PLAN:
- Pattern payload bindings (Some(value) => value) in bootstrap and selfhost
- Empty-param closures via || (tkPipePipe) with loop/return bodies
- Expression-form match: let x = match …; newline before arms
- f"…" string interpolation desugared to String_Concat + conversions
- Lexer preserves \{ \} for literal braces in f-strings
- Bootstrap fix: f"plain" strips the f prefix after escape processing
- Examples: pattern_matching, closure_control, match_let, string_interp
Selfhost-loop remains binary-identical; all examples and error goldens pass.
This commit is contained in:
@@ -79,6 +79,8 @@ struct Pattern {
|
||||
patStructName: String, // for pkStruct
|
||||
patChild1: *Pattern, // range lo / nested
|
||||
patChild2: *Pattern, // range hi / nested
|
||||
patArgs: *Pattern, // pkEnum payload args (head)
|
||||
patNext: *Pattern, // next sibling in patArgs list
|
||||
}
|
||||
|
||||
// Match arm: pattern => body
|
||||
|
||||
Reference in New Issue
Block a user