Commit Graph

8 Commits

Author SHA1 Message Date
5dcc294143 parser: add warn, assign destructure, fix statement bodies; enable CodeGen.zig
- Add warn() for non-fatal parse errors (like Zig's Parse.warn)
- Implement finishAssignDestructureExpr for destructuring assignments
- Use parseBlockExpr instead of parseBlock in for/while statement bodies
- Use parseSingleAssignExpr in switch prongs
- Enable x86_64/CodeGen.zig corpus entry

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:17:18 +00:00
cfaa83f991 parser: fix extra_data write ordering in parseSwitchProng for multi-item switch cases
Enables 39 files from compiler/aro/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 22:36:07 +00:00
4857895067 astgen: fix InternPool.zig — parser fallthrough for struct/enum/union, add @compileLog, fix @"..." escape scanning
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 16:18:20 +00:00
fe95412fad fix labeled switch: parser passes is_labeled flag, init GenZir continue_block/label_token to UINT32_MAX
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 14:01:25 +00:00
7eb8459981 parser: add anyframe, labeled switch, fix inline fallthrough
- Implement anyframe and anyframe->T parsing in parseTypeExpr and
  parsePrimaryTypeExpr (was failing with unsupported error).
- Add labeled switch support: identifier:switch in parsePrimaryExpr
  and parsePrimaryTypeExpr, with main_token = switch_token - 2.
- Fix TOKEN_KEYWORD_INLINE fallthrough into TOKEN_PERIOD case in
  parsePrimaryTypeExpr; handle it separately expecting for/while.

Reduces corpus test failures from 20 to 7.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:31:22 +00:00
99af7d4623 astgen: add inline switch prong parsing and float literal support
- parser.c: Handle TOKEN_KEYWORD_INLINE in parseSwitchProng, producing
  AST_NODE_SWITCH_CASE_INLINE_ONE / AST_NODE_SWITCH_CASE_INLINE nodes.
  This fixes parsing of multi_array_list.zig which uses `inline else`.
- astgen.c: Implement float literal parsing in numberLiteral using
  strtold with f64 round-trip check. Add addFloat helper and addPlNodeQuad
  for float128 emission. Extend token scanning to include exponent markers.
- multi_array_list.zig still skipped: remaining diffs in bool_not,
  bool_br_and, ret_is_non_err.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:55:52 +00:00
bb0b04c575 Merge commit '0b12e027a3628e26a765126d9937a2366b638ff3' into zig0-0.15.1 2026-02-14 00:07:36 +02:00
b81f72bab3 Add 'stage0/' from commit 'b3d106ec971300a9c745f4681fab3df7518c4346'
git-subtree-dir: stage0
git-subtree-mainline: 3db960767d
git-subtree-split: b3d106ec97
2026-02-13 23:32:08 +02:00