Commits
Click on a commit to change the comparison range✨ feat(lang): add loop construct for infinite loops with break/continue support
Implements a new 'loop' keyword that creates an infinite loop construct.
The loop can be controlled using 'break' to exit and 'continue' to skip
to the next iteration.
Changes:
- Added Loop token kind and keyword parsing in lexer
- Added Loop expression nodes in AST and CST
- Implemented loop evaluation logic with break/continue handling
- Added loop support in formatter, macro expansion, and HIR
- Added semantic token support in LSP
- Added comprehensive integration tests
Example usage:
let x = 0 | loop: let x = x + 1 | if(x > 5): break else: x;; ✨ feat(eval): add test cases for loop constructs with immediate break support ✨ feat(docs): add loop expression section with examples and use cases ✨ feat(eval): simplify loop control in evaluator by removing first iteration checks ✨ feat(lexer): reorder control keywords for improved parsing efficiency