Skip to content

phase2/04: enums end-to-end with trailing comma and fold - #95

Merged
rieske merged 2 commits into
masterfrom
phase2/04-enums
Jul 31, 2026
Merged

phase2/04: enums end-to-end with trailing comma and fold#95
rieske merged 2 commits into
masterfrom
phase2/04-enums

Conversation

@rieske

@rieske rieske commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Enums end-to-end: grammar trailing comma, CSNB productions, PE open-enum counter + redefinition, AST snapshot, SA import, shadow-aware resolve, codegen AssignConstant.
  • Collapse pure-03 depth-1 enum stack fiction to optional<long> nextEnumeratorValue_.
  • Product limits: TU-flat enumerators (not C block scope); signed-int stand-in types; nested enum-in-const_exp unsupported.

Stack

Phase 2 PR 4 of 6 (base: phase2/03-parse-environment).

Depends on #94.

Test plan

  • EnumsTest functional ladder (values, trailing comma, prior-ref, struct-nested, redef, file-scope clash, shadow, ~)
  • Full ctest green on stack tip

Add enum_spec CSNB, TypeSpecifier enumerators, IdentifierExpression fold,
SymbolTable enum import, and AssignConstant codegen. Grammar trailing
enumerator comma with regenerated parsing table; port EnumsTest.
@mergify

mergify Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Base automatically changed from phase2/03-parse-environment to master July 31, 2026 20:01
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 92.13% (+0.04%) from 92.087% — phase2/04-enums into master

@rieske
rieske merged commit 69940aa into master Jul 31, 2026
4 checks passed
@rieske
rieske deleted the phase2/04-enums branch July 31, 2026 20:09
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.

2 participants