feat: Major grammar improvements and refactoring

- Refactor statement parsing with proper precedence handling
- Improve block structure parsing with indent/dedent support
- Enhance control flow parsing (conditionals, loops)
- Add print command support
- Improve function declaration parsing
- Update scanner for better string and comment handling
- Add comprehensive test corpus
- Better handling of newlines and statement boundaries
This commit is contained in:
2025-11-26 22:19:38 +01:00
parent b7942e9f79
commit 4d61f91e06
9 changed files with 15323 additions and 18695 deletions

13
corpus/debug.txt Normal file
View File

@@ -0,0 +1,13 @@
Debug EOF
=========
?hp < 10
activate potion
---
(source_file
(conditional
(binary_expression (identifier) (number))
(block
(command (identifier) (identifier))
)
)
)