Skip to content

Fix ABI 15 array-bound and constructor parsing - #5

Merged
DavidBakerEffendi merged 2 commits into
masterfrom
dave/cpp-abi15-parser-regressions
Oct 11, 2026
Merged

DavidBakerEffendi merged 2 commits into
masterfrom
dave/cpp-abi15-parser-regressions

Conversation

@DavidBakerEffendi

@DavidBakerEffendi DavidBakerEffendi commented Oct 9, 2026 •

Copy link
Copy Markdown

Grammar 0.24.0 could consume declarations following a conditional array bound and parse qualified defaulted constructors as assignments. The 0.24.1 constructor repair covered file scope but missed namespace declaration lists. This prepares 0.24.2 with both contexts restored and the original array repair retained.

Key Changes:

  • Represent the complete guarded array prefix and tail as preproc_array_size, retaining following declarations outside the feature guard.
  • Prefer qualified constructor definitions with the full function-declarator sequence at file scope and inside namespace declaration lists; preserve inline constructors and ordinary expression controls.
  • Keep all original corpus cases and add nested namespace and Rust regressions on minimum Tree-sitter 0.25.10 and current 0.26.13. Synchronize patch metadata at 0.24.2.

Touch Points:

  • grammar.js, generated src/grammar.json, src/node-types.json, src/parser.c
  • test/corpus/abi15-regressions.txt, bindings/rust/lib.rs
  • Cargo.toml, Cargo.lock, .github/workflows/ci.yml
  • README.md, npm/Python metadata, tree-sitter.json

Local validation at a124af8725cb91e8c609e10f3ce168d1ed5d5fe7: 213 corpus cases and 26 highlight assertions pass. Default/all-feature Rust tests and doctests pass on both runtimes; Node rebuild/test, formatting, Clippy, ESLint, package verification, and byte-identical repeat ABI15 generation pass. Bifrost's exact-runtime probe confirms namespace constructor declaration shape. All eight hosted checks pass at that exact head. The complete Bifrost consumer integration gate passes 1909/1909 on Tree-sitter 0.25.10, with focused C++ and analysis/cache gates passing 273/273 and 270/270.

General #if, #else, and nested directives inside array bounds remain unsupported.

The earlier 0.24.1 crate was published from parent 06142457d63e81f0ad423d84536b7dd0f67c38d1 by run 37967090595. Version 0.24.2 is published from immutable commit a124af8725cb91e8c609e10f3ce168d1ed5d5fe7 by run 37974277116. The downloaded crate matches registry checksum 9e32dec5d2e7b2cbd64969c6d479ae156271f903e57e8a74b2938484eb6afd85, its VCS source, generated files, grammar, and Rust binding bytes.

@DavidBakerEffendi
DavidBakerEffendi marked this pull request as draft October 9, 2026 17:58
Register the qualified constructor rule in namespace declaration-list items and retain the original file-scope regression. Add nested namespace and ordinary expression controls, exercise both supported Rust runtimes, and prepare 0.24.2 metadata.

All 213 corpus cases and 26 highlight assertions pass. Default/all-feature Rust tests and doctests pass on 0.25.10 and 0.26.13; Clippy, Node binding rebuild/test, package verification and repeat ABI15 generation pass. Bifrost downstream qualification is required before publication.
@DavidBakerEffendi
DavidBakerEffendi marked this pull request as ready for review October 9, 2026 18:34
@DavidBakerEffendi
DavidBakerEffendi merged commit e8d7231 into master Oct 11, 2026
8 checks passed
@DavidBakerEffendi
DavidBakerEffendi deleted the dave/cpp-abi15-parser-regressions branch October 11, 2026 05:40
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