Bob Nystrom
dc2f053d76
feat: add while loop token, parser support, CODE_LOOP opcode, and patchJump helper
...
Add TOKEN_WHILE to the token enum and keyword lookup in the compiler, enabling the parser to recognize 'while' statements. Introduce the CODE_LOOP opcode in the VM for backward jumps, and implement the patchJump helper to resolve forward jump offsets during compilation. Include comprehensive test cases for while loops covering single-expression bodies, block bodies, newline handling, and null result semantics.
2013-11-18 06:38:59 +00:00
..
2013-11-13 15:10:52 +00:00
2013-11-13 15:10:52 +00:00
2013-11-13 15:10:52 +00:00
2013-11-13 15:10:52 +00:00
2013-11-13 15:10:52 +00:00
2013-11-13 15:10:52 +00:00
2013-11-13 15:10:52 +00:00
2013-11-13 15:10:52 +00:00
2013-11-07 15:04:25 +00:00
2013-11-13 15:10:52 +00:00
2013-11-04 05:38:58 +00:00
2013-11-13 19:05:03 +00:00
2013-11-08 01:07:32 +00:00
2013-11-08 01:07:32 +00:00
2013-11-14 01:09:47 +00:00
2013-11-14 01:09:47 +00:00
2013-11-14 01:09:47 +00:00
2013-11-10 05:32:57 +00:00
2013-11-09 19:38:01 +00:00
2013-11-09 19:38:01 +00:00
2013-11-06 15:47:47 +00:00
2013-11-15 02:25:28 +00:00
2013-11-06 15:47:47 +00:00
2013-11-13 15:10:52 +00:00
2013-11-18 06:38:59 +00:00
2013-11-08 01:07:32 +00:00
2013-11-09 19:38:01 +00:00
2013-11-09 19:38:01 +00:00
2013-11-09 19:18:27 +00:00
2013-11-14 18:27:33 +00:00
2013-11-10 19:46:13 +00:00
2013-11-01 13:57:21 +00:00
2013-11-06 02:22:22 +00:00
2013-11-10 05:32:57 +00:00
2013-11-10 05:32:57 +00:00
2013-11-10 05:32:57 +00:00
2013-11-10 05:32:57 +00:00
2013-11-10 05:32:57 +00:00
2013-11-13 15:10:52 +00:00
2013-11-10 05:32:57 +00:00
2013-11-10 05:32:57 +00:00
2013-11-10 05:32:57 +00:00
2013-11-10 05:32:57 +00:00
2013-11-17 18:04:02 +00:00
2013-10-28 13:53:51 +00:00
2013-11-05 17:57:57 +00:00
2013-10-28 13:45:19 +00:00
2013-11-06 04:38:16 +00:00
2013-11-09 23:42:23 +00:00
2013-11-09 23:42:23 +00:00
2013-11-09 23:42:23 +00:00
2013-10-28 14:12:39 +00:00
2013-11-06 15:47:47 +00:00
2013-11-09 19:38:01 +00:00
2013-11-09 19:38:01 +00:00
2013-11-09 23:42:23 +00:00
2013-11-09 19:38:01 +00:00
2013-11-18 06:38:59 +00:00