Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert hyphen in tree-sitter grammar name to underscore #25881

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hippietrail
Copy link
Contributor

@hippietrail hippietrail commented Mar 2, 2025

Release Notes:

  • compile_grammar() in extension_builder.rs passes the name of the Tree-sitter grammar directly to ld as a symbol to be exported. But C does not allow hyphens in symbol names.

This is a work-in-progress since I haven't been able to find where the symbol is imported yet.

My Tree-sitter grammar is here: https://github.com/hippietrail/tree-sitter-harper-dict
See the discussion I started before digging into the code: #25847

`compile_grammar()` in `extension_builder.rs` passes the name of the Tree-sitter grammar directly to `ld` as a symbol to be exported. But C does not allow hyphens in symbol names.

This is a work-in-progress since I haven't been able to find where the symbol is imported yet.

My Tree-sitter grammar is here: https://github.com/hippietrail/tree-sitter-harper-dict
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 2, 2025
@hippietrail hippietrail changed the title convert hyphen in tree-sitter grammar name to underscore Convert hyphen in tree-sitter grammar name to underscore Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant