Skip to content

Emit translation unit declarations and macros#10

Merged
MoSafi2 merged 2 commits into
mainfrom
parse_all_headers
Jun 1, 2026
Merged

Emit translation unit declarations and macros#10
MoSafi2 merged 2 commits into
mainfrom
parse_all_headers

Conversation

@MoSafi2

@MoSafi2 MoSafi2 commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Emit top-level declarations and source-backed macros from the parsed translation unit instead of filtering to configured header paths.
  • Remove parser-side embedded-record materialization and primary-header compatibility aliases now that translation-unit cursors are lowered directly.
  • Rename the orphan-record reachability repair to signature-only record stub materialization, keeping it only for record refs without standalone top-level cursors.
  • Align macro folding with emission: source-backed object-like macros participate in expansion, while compiler/predefined no-file macros are skipped.

Why

The parser now walks the whole translation unit, so several frontend and analysis paths that compensated for primary-header-only parsing were no longer the right abstraction. This makes the parser policy explicit and removes redundant recovery logic while preserving a narrow fallback for signature-only opaque record refs.

Validation

  • pixi run precommit
  • Commit hook reran the same validation suite: 244 passed, 8 skipped, 15 deselected

@MoSafi2 MoSafi2 marked this pull request as ready for review June 1, 2026 07:29
@MoSafi2 MoSafi2 merged commit 9320428 into main Jun 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant