Skip to content

Fix singleton class external token name typo - #6

Merged
tarebyte merged 2 commits into
masterfrom
fix/singleton-class-token-name
Sep 2, 2026
Merged

Fix singleton class external token name typo#6
tarebyte merged 2 commits into
masterfrom
fix/singleton-class-token-name

Conversation

@tarebyte

@tarebyte tarebyte commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

The hidden external token for the << in class << self was named _singleton_class_left_angle_left_langle, which duplicates the "l" from "langle" onto an already spelled-out "left_angle". The scanner's matching enum is SINGLETON_CLASS_LEFT_ANGLE_LEFT_ANGLE, so the two sides of the external token list did not read the same.

The token stays hidden and aliased to <<, so no public node name changes and src/node-types.json is unaffected.

Validation

  • 332 corpus parses and 5 highlight files, zero failures.
  • The rename is confined to grammar.js; src/grammar.json and src/parser.c change only where the regenerated parser embeds the symbol name.

References

Reimplements tree-sitter#296.

Note: this branch and #11 both regenerate src/parser.c, so whichever merges second will need a regenerate.

The hidden external token for the `<<` in `class << self` was named
`_singleton_class_left_angle_left_langle`, duplicating "l" from "langle"
onto an already spelled-out "left_angle". The scanner's matching enum is
`SINGLETON_CLASS_LEFT_ANGLE_LEFT_ANGLE`; line the grammar name up with
it so the external token list reads the same on both sides.

The token stays hidden and aliased to `<<`, so no public node name
changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tarebyte
tarebyte merged commit 311ba38 into master Sep 2, 2026
5 checks passed
@tarebyte
tarebyte deleted the fix/singleton-class-token-name branch September 2, 2026 00:52
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