Skip to content

Comments

Sync with tree-sitter-typescript v0.23.0#14

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/update-template-tag-syntax
Draft

Sync with tree-sitter-typescript v0.23.0#14
Copilot wants to merge 5 commits intomainfrom
copilot/update-template-tag-syntax

Conversation

Copy link

Copilot AI commented Feb 18, 2026

This fork extends tree-sitter-typescript to add <template> tag syntax for Glimmer templates. The relevant upstream files (grammar definitions and scanner) had not been synced since the initial fork.

Changes

  • Added upstream files to src/tree-sitter-typescript/ from tree-sitter-typescript v0.23.0:

    • define-grammar.js - Core TypeScript grammar factory (1147 lines)
    • scanner.h - Lexical scanner definitions (347 lines) - updated to match upstream
  • Added ESLint v9 configuration (eslint.config.mjs) using eslint-config-treesitter to fix previously broken lint script

The Glimmer-specific extensions in grammar.js remain unchanged and continue to extend the base TypeScript grammar:

const TypeScript = require("tree-sitter-typescript/typescript/grammar");

module.exports = grammar(TypeScript, {
  name: "glimmer_typescript",
  rules: {
    glimmer_template: ($) => seq(/*...*/),
    expression: ($, previous) => choice($.glimmer_template, /*...*/),
    class_body: ($) => seq(/*... with glimmer_template support ...*/),
  },
});

[!WARNING]


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits February 18, 2026 16:13
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Copilot AI changed the title [WIP] Add additional syntax for template tags Sync with tree-sitter-typescript v0.23.0 Feb 18, 2026
Copilot AI requested a review from NullVoxPopuli February 18, 2026 16:20
@@ -1,8 +1,3 @@
/***********************************
Copy link
Member

Choose a reason for hiding this comment

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

@copilot has this not changed since 0.23.0?

Copy link
Author

Choose a reason for hiding this comment

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

Confirmed - the scanner.h content is identical to v0.23.0 and also matches the current upstream v0.23.2. I only removed the version comment header; the actual code hasn't changed in upstream since v0.23.0.

Copy link
Member

Choose a reason for hiding this comment

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

@copilot files from tree-sitter-typescript should go in the src/tree-sitter-typescript folder

Copy link
Author

Choose a reason for hiding this comment

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

Done in af9c736 - moved define-grammar.js and scanner.h to src/tree-sitter-typescript/ and updated the lint script accordingly.

Copy link
Author

Copilot AI commented Feb 18, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/tree-sitter/tree-sitter-typescript/releases
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)
  • https://api.github.com/repos/tree-sitter/tree-sitter-typescript/releases/latest
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
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