Skip to content

Conversation

@davidnich
Copy link
Member

Summary

  • Upgrade tree-sitter from v0.24.6 to v0.26.3 (ABI 15)
  • Add TypeScript grammar (v0.23.2) with ts/typescript aliases
  • Add TSX grammar for React/JSX support
  • Add custom Qore grammar with comprehensive syntax support
  • Fix CI script permissions
  • Update tests for all new languages (50 tests, 89 assertions)

Qore Grammar Features

The custom Qore grammar (grammars/tree-sitter-qore/) supports:

  • Parse directives (%new-style, %requires, etc.)
  • Namespaces, classes, functions, hashdecl, typedef
  • All control flow statements (if, while, for, foreach, switch, try/catch)
  • Operators with proper precedence
  • Literals (strings, numbers, dates, binary, regex)
  • Higher-order functions (map, select, foldl, foldr)
  • Context statements

Notes

  • Timeout API changed in v0.26+ - value is stored but not actively enforced since ts_parser_parse_string doesn't support the new progress callback mechanism
  • All tests pass with no memory leaks (verified with valgrind)

Test plan

  • All 50 test cases pass
  • No memory leaks (valgrind)
  • CI passes on Ubuntu
  • CI passes on Alpine

🤖 Generated with Claude Code

davidnich and others added 2 commits January 4, 2026 14:56
- Upgrade tree-sitter from v0.24.6 to v0.26.3 (ABI 15)
- Add TypeScript grammar (v0.23.2) with ts/typescript aliases
- Add TSX grammar for React/JSX support
- Add custom Qore grammar with comprehensive syntax support:
  - Parse directives (%new-style, %requires, etc.)
  - Namespaces, classes, functions, hashdecl, typedef
  - All control flow statements
  - Operators with proper precedence
  - Literals, regex, higher-order functions
- Fix CI script permissions (chmod +x)
- Update tests for all new languages
- Update README with new supported languages

Note: Timeout API changed in v0.26+ - value is stored but not
actively enforced since ts_parser_parse_string doesn't support
the new progress callback mechanism.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Copy link

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 upgrades tree-sitter from v0.24.6 to v0.26.3 (ABI 15) and adds support for three new programming languages: TypeScript, TSX (React/JSX), and a custom Qore grammar. The main changes include updating the tree-sitter API to handle the new timeout mechanism, adding language parsers, updating tests, and introducing CI test scripts for Ubuntu and Alpine Linux environments.

Key changes:

  • Tree-sitter library upgraded with corresponding API changes for timeout handling
  • Three new language grammars integrated (TypeScript, TSX, Qore)
  • Test suite expanded with 5 new test cases covering the new languages
  • CI infrastructure scripts added for Docker-based testing

Reviewed changes

Copilot reviewed 13 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
CMakeLists.txt Updates tree-sitter version to v0.26.3, adds TypeScript and Qore grammar dependencies
src/TreeSitterParser.h Adds timeout_micros field to store timeout value for v0.26+ compatibility
src/TreeSitterParser.cpp Updates timeout API to store value without enforcement due to v0.26+ API changes
src/TreeSitterLanguages.cpp Registers TypeScript, TSX, and Qore languages with appropriate aliases
test/treesitter.qtest Adds 5 new test cases for TypeScript, TSX, and Qore parsing
test/docker_test/test-ubuntu.sh New CI script for Ubuntu-based testing environment
test/docker_test/test-alpine.sh New CI script for Alpine Linux-based testing environment
grammars/tree-sitter-qore/* Custom Qore grammar implementation files (parser headers, grammar definitions, configuration)
README.md Documents the three new supported languages with usage examples

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

@davidnich davidnich merged commit 439a6f8 into develop Jan 4, 2026
@davidnich davidnich deleted the feature/add-typescript-qore-grammars branch January 4, 2026 14:04
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