Added loop control heel and stay and updated the relevant docs#21
Added loop control heel and stay and updated the relevant docs#21Rayaan-Raza wants to merge 1 commit into
Conversation
|
Works seamlessly with wagtail loops Supports nested loops Proper error handling when used outside loops Fully covered by new test cases Updated docs and examples so users can get started right away 🔧 Under the Hood Added a loopcontrol.py module with a handler and error class Integrated heel/stay parsing in SyntaxAnalyser.py Updated main.py with execution logic and better loop context handling Improved tokenizer (Tokenizer.py) to properly handle comments 📚 Docs & Examples Updated features.md and usage.md with examples Added sample .doggy programs showing basic and advanced use of heel and stay 🧪 Testing New test suite (tests/test_loop_control.py) with 8 cases Covers basics, nested loops, invalid usage, and conditionals ✅ All tests passing 💡 Example Break (heel): wagtail i < 5 { Output: 0, 1, 2Continue (stay): wagtail i < 5 { Output: 1, 3, 5🐛 Fixes Along the Way Replaced recursive loop execution with a safer iterative approach (fixes infinite loops) Fixed tokenizer so comments (#) are no longer parsed as code Improved loop context + flag management ✅ Checklist Loop control implemented Parser + interpreter updated Tests written & passing Docs & examples added No breaking changes |
|
Hey @Rayaan-Raza , just saw your implementation please try to understand code first, don't use AI tools blindly. |
No description provided.