Fix 11 divergences where parser.c differed from Parse.zig in logic or structure, not justified by C vs Zig language differences: - parseContainerMembers: set trailing=false after test decl, add field_state tracking (A1, A2) - expectStatement: guard defer/errdefer behind allow_defer_var (A3) - expectVarDeclExprStatement: wrap assignment in comptime node when comptime_token is set (A4) - parseBlock: guard semicolon check with statements_len != 0 (A5) - parseLabeledStatement: add parseSwitchExpr call (A6) - parseWhileStatement: restructure with else_required and early returns to match upstream control flow (A7) - parseForStatement: restructure with else_required/has_else and early returns to match upstream control flow (A8) - parseFnProto: fail when return_type_expr is missing (A9) - expectTopLevelDecl: track is_extern, reject extern fn body (A10) - parsePrefixExpr: remove TOKEN_KEYWORD_AWAIT case (A11) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
116 KiB
116 KiB