Skip to content

001 update cst types#1

Merged
akollegger merged 21 commits into
mainfrom
001-update-cst-types
Oct 26, 2025
Merged

001 update cst types#1
akollegger merged 21 commits into
mainfrom
001-update-cst-types

Conversation

@akollegger
Copy link
Copy Markdown
Contributor

brings this project up-to-date with tree-sitter-gram@0.2.0

@akollegger akollegger requested a review from Copilot October 26, 2025 15:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the gram CST type definitions to align with tree-sitter-gram@0.2.0, introducing a new stringifyCst utility for s-expression output and comprehensive corpus-based regression tests.

Key Changes:

  • Updated CST type definitions to match tree-sitter-gram@0.2.0 grammar (renamed arrow types, new node types like symbol, annotation, tagged_string)
  • Added stringifyCst function for deterministic s-expression output matching tree-sitter CLI conventions
  • Implemented corpus-based regression test suites covering positive and error cases

Reviewed Changes

Copilot reviewed 87 out of 90 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/gram/src/lib/parser/cst-types.ts Complete rewrite aligning CST types with updated grammar, replacing old arrow types with new taxonomy
packages/gram/src/lib/parser/cst-stringify.ts New stringifier implementation for CST → s-expression conversion
packages/gram/src/lib/parser/corpus-loader.ts Corpus fixture loader for regression testing
packages/gram/src/lib/parser/corpus-positive.spec.ts Positive corpus case validation tests
packages/gram/src/lib/parser/corpus-errors.spec.ts Error corpus case validation tests
packages/gram/src/lib/parser/grammar-metadata.ts Grammar metadata accessor for node type validation
packages/gram/src/lib/parser/parser.ts Updated to use new CST type taxonomy and handle renamed fields
packages/gram/README.md Added stringifier usage examples and upgrade notes
packages/gram/package.json Updated dependencies including tree-sitter and effect versions
package.json Updated Nx toolchain and dependencies to v22
tsconfig.base.json Removed deprecated gram-old package path, added @gram-data/data

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/gram/src/lib/data/strings.spec.ts Outdated
Comment thread packages/gram/src/lib/data/numbers.spec.ts Outdated
Comment thread AGENTS.md Outdated
Comment thread packages/gram/README.md Outdated
akollegger and others added 7 commits October 26, 2025 15:43
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Andreas Kollegger <akollegger@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Andreas Kollegger <akollegger@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Andreas Kollegger <akollegger@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Andreas Kollegger <akollegger@gmail.com>
@akollegger akollegger merged commit 3aae55d into main Oct 26, 2025
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.

2 participants