Commit Graph

14 Commits

Author SHA1 Message Date
5cffc20ef3 remove obsolete functions/decls 2026-02-12 16:13:56 +02:00
fdefdc98c2 parser: sync tests with upstream, fix tokenizer and parser
Sync parser_test.zig test section with upstream, adding ~40 new tests
(testError, testCanonical, testTransform). Remove extra blank lines
between tests to match upstream formatting.

Fix tokenizer keyword lookup bug: getKeyword() returned TOKEN_INVALID
when input was longer than a keyword prefix (e.g., "orelse" matched
"or" prefix then bailed out instead of continuing to find "orelse").

Fix parser to handle if/for/while expressions in type position (e.g.,
function return types like `fn foo() if (cond) i32 else void`). Add
labeled block support in parsePrimaryTypeExpr. Replace assert for
chained comparison operators with longjmp error.

365/381 tests pass. Remaining 16 failures are parser limitations for
specific syntax patterns and error recovery.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-11 14:40:31 +00:00
cb8d46b1ab fix tcc 2026-02-10 11:35:41 +00:00
2948cfd7cf zig 0.15.1
With opus 4.6
2026-02-10 10:03:44 +00:00
aa0fab43e4 fmt 2025-01-08 19:04:40 +01:00
1f134595de start with parser tests 2025-01-04 22:47:51 +01:00
3264d1747e replace TOKENIZER_TAG_ with TOKEN_ 2024-12-30 22:38:26 +02:00
6006a802e1 making tcc happier 2024-12-29 00:13:54 +02:00
ef3ef64abd more macros 2024-12-23 21:56:56 +02:00
db35aa7722 rename types 2024-12-22 22:31:16 +02:00
228b215259 making parser 2024-12-20 00:24:51 +02:00
7361b6058d linters, some ast headers 2024-12-19 00:24:03 +02:00
c2915d2eaa start ast + fix type names in tokenizer 2024-12-15 22:11:45 +02:00
6863e34fbc Tokenizer 2024-12-13 09:39:02 +02:00