cd07751d13886d31235ea904fc8f9f51a24384b7
Mechanically port error handling patterns from upstream Parse.zig: - &&/whitespace validation in binary operator parsing - varargs state tracking in parameter lists - invalid_bit_range check for slice types - same-line doc comment detection in eatDocComments - required for-loop payload validation - error keyword requiring '.' for error values - expected_semi_or_else checks in if/for/while statements - labeled for/while/inline expressions in parsePrimaryExpr - doc comment validation for test/comptime blocks - EOF check in parseRoot - comptime handling in else-branch context All 381/381 tests pass with 0 skipped. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
zig0 aspires to be an interpreter of zig 0.15.1 written in C.
Testing
Quick test:
zig build fmt && zig build
Debugging tips
Test runs infinitely? Build the test program executable:
$ zig build test -Dno-exec
And then run it, capturing the stack trace:
gdb -batch
-ex "python import threading; threading.Timer(1.0, lambda: gdb.post_event(lambda: gdb.execute('interrupt'))).start()"
-ex run
-ex "bt full"
-ex quit
zig-out/bin/test
You are welcome to replace -ex "bt full" with anything other of interest.
Languages
Zig
96.3%
C
2.7%
C++
0.6%
Python
0.1%