Commit Graph

9 Commits

Author SHA1 Message Date
e4c008bd4b doughlang: Expressions in patterns
ast:
- Document operators
- Parameterize Pat with Annotation
- Consolidate Path and Lit into "Value" (Expr)
- Consolidate NamedRecord/Namedtuple into PatOp::TypePrefixed
- Allow Pat<Pat,*> patterns
- Additional helper functions on Expr and Pat

lexer:
- Support inner-doc comment syntax `//!`
  - Cleans up `///` or `//!` prefix

parser:
- Make Parse::Prec `Default`
- Allow expression elision after `..`/`..=`
- Fix Parser::consume not updating elide_do state
- Add token splitting, to make `&&Expr` and `&&Pat` easier
- error: Embed Pat precedence in ParseError
2026-01-05 15:17:22 -05:00
e199e15804 parser: Tweak type and fn precedence 2025-12-24 17:44:59 -05:00
f551e3aef3 ast: Break compatibility
- Turned `static` and `const` into scoped modifiers (like `pub`
- Added anonymous record patterns
2025-12-20 05:22:14 -05:00
e566ea62e5 ast: Give for loops a dedicated node and remove eager desugar 2025-12-01 23:16:47 -05:00
30871013cd parser/expr: Don't next() the precedences in bind; it makes everything less readable. 2025-11-02 00:37:28 -04:00
6c4c58dc2e parser/expr: Like I said in the comment... 2025-11-01 21:11:33 -04:00
c1d32f3efc ast: Add Fold, Folder traits, reorganize visit
parser: fix precedence of `BindOp::Let`
2025-10-29 04:39:41 -04:00
d5e25a15dc ast: add continue expression 2025-10-28 22:47:58 -04:00
8e2bc5ad85 src: Split parser into modules, reorganize AST 2025-10-28 22:15:06 -04:00