conlang: PATTERN MATCHING AND DESTRUCTURED BINDINGS WOOOOO
- Integrate the Match and Pattern nodes into the AST
- TODO: `let x: T` is ambiguous with `let x: {}`. Currently the latter takes precedence in the parser.
- Implement pattern matching through unification in the interpreter.
- It's not fast, but it works!
- Refactor destructuring assignments to use the new pattern functionality
This commit is contained in:
@@ -380,6 +380,7 @@ pub mod yamlify {
|
||||
match self {
|
||||
ExprKind::Quote(k) => k.yaml(y),
|
||||
ExprKind::Let(k) => k.yaml(y),
|
||||
ExprKind::Match(k) => k.yaml(y),
|
||||
ExprKind::Assign(k) => k.yaml(y),
|
||||
ExprKind::Modify(k) => k.yaml(y),
|
||||
ExprKind::Binary(k) => k.yaml(y),
|
||||
|
||||
Reference in New Issue
Block a user