Repository navigation
Sync upstream C++ grammar for 0.24.0 - #3
Merged
Merged
Conversation
Bumps [tree-sitter/setup-action](https://github.com/tree-sitter/setup-action) from 1 to 2. - [Release notes](https://github.com/tree-sitter/setup-action/releases) - [Commits](tree-sitter/setup-action@v1...v2) --- updated-dependencies: - dependency-name: tree-sitter/setup-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
P1102R2 relaxed lambda syntax so that () (empty parameter list) is optional in more cases.
This is needed by the MIT license terms ``` ❯ cargo package --list | grep LICENSE LICENSE ``` Signed-off-by: Michel Lind <salimma@fedoraproject.org>
- _block_item shouldn't contain module import/export/declarations as they have to be top-level only - This allows us to reuse _block_item as the rule for exportable items, reducing our state count and parser size quite dramatically
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v4...v5) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [tree-sitter/parser-test-action](https://github.com/tree-sitter/parser-test-action) from 2 to 3. - [Release notes](https://github.com/tree-sitter/parser-test-action/releases) - [Commits](tree-sitter/parser-test-action@v2...v3) --- updated-dependencies: - dependency-name: tree-sitter/parser-test-action dependency-version: '3' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
This adds support for all the language changes introduced in P2996 which was recently voted into the upcoming c++26 standard. This includes: - reflection expressions: the reflect operator (^^) followed by expressions, type descriptors, or the global namespace (::) - splice specifiers/expressions: [: expression :], which can appear as a type, expression, alias descriptor, and more. - consteval blocks: similar to static_asserts but have been introduced specifically to allow constant evaluation side effects to occur at specific places in code
Related to reflection, annotations use the same syntax as attributes, but begin with an `=` and support any constant expression. Annotations and Attributes can't be mixed within [[ ... ]].
Introduces support for `template for ( init; for-range-decl : expansion-init )` which is a compile-time way to expand (iterate over): - expansion expressions - anything destructurable via structured bindings - ranges with compile time size It was sufficient to simply re-use the existing rule for _for_range_loop_body for the part inside the parentheses, but add the required sequence of `template` followed by `for`
- allow module related statements to appear in preprocessor blocks - export declarations can now appear anywhere other declarations can
Merge tree-sitter/tree-sitter-cpp master at c009222, retaining Brokk Windows include and conditional extern-C guard fixes. Regenerate ABI 15 with pinned C 0.24.1 and CLI 0.26.3, update binding runtimes and synchronized package metadata, and expand regression and binding CI coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sync the Brokk C++ grammar with upstream master at
c009222808634c1014f82438d4883753516a2c24and preparebrokk-tree-sitter-cpp0.24.0. The new compatibility line uses parser ABI 15 and requires Tree-sitter 0.25 or newer.Key Changes:
Touch Points:
grammar.js,src/,queries/highlights.scmtest/corpus/,test/highlight/,bindings/rust/lib.rs,bindings/go/binding_test.go,bindings/python/tests/test_binding.pyCargo.toml,Cargo.lock,package.json,package-lock.json,pyproject.toml,go.mod,go.sum,Package.swift,Package.resolved.github/workflows/ci.yml,README.md,tree-sitter.json,CMakeLists.txt,Makefile,.gitignoreValidation: all 207 corpus cases and both highlight files pass; Rust regressions and doctests pass with default and all features; Node, Python, Go, and Swift binding tests pass; CMake C build, ESLint, Rust formatting, whitespace, and generated-parser reproducibility pass. Cargo publishing dry run, npm package listing, and Python wheel build pass. A separate compatibility test confirms the crate loads alongside upstream tree-sitter-cpp 0.23.4 on Tree-sitter 0.25.10.
Publication will follow successful hosted CI on the integrated master commit.