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

chore: document preferred language for scanner #2972

Merged
merged 1 commit into from Feb 9, 2024

Conversation

calebdw
Copy link
Contributor

@calebdw calebdw commented Feb 9, 2024

Hello!

This documents that C is the preferred language for external scanners as mentioned in #2897 (comment)

Thanks!

@amaanq
Copy link
Member

amaanq commented Feb 9, 2024

We might even consider removing c++ support, it's just not needed.

@calebdw
Copy link
Contributor Author

calebdw commented Feb 9, 2024

I'm fine with that, I can update the docs if you want.

@sogaiu
Copy link

sogaiu commented Feb 9, 2024

@amaanq I guess you'd know pretty well about how much C++ use there is in practice given how much rewriting you've done (^^;

Should I check via ts-questions for any remaining scanner.cc files?

@amaanq
Copy link
Member

amaanq commented Feb 9, 2024

yeah sure I'll check as well and rewrite any that seem to have some sizable usage/relevance, I've just finished rewriting Ruby (last upstream one in c++ that I didn't bother to touch 😆)

@sogaiu
Copy link

sogaiu commented Feb 9, 2024

Some rough results of find | grep | sort | uniq | wc -l:

  • grammar.js: 423
  • scanner.c: 149
  • scanner.cc: 31

Number of repositories: 406


cc.txt

@amaanq
Copy link
Member

amaanq commented Feb 9, 2024

A few of those I already sent PRs to rewrite and either the owner just didn't respond or didn't want it (astro, beancount, nickel, cooklang) 🤷
Ikatyang also looks to be very inactive (yaml/vue) 😬

We can keep c++ compilation for now, but in the future I'd like to remove it, and will be removing the mangled c++ symbols that wasm will use for its exported stdlib functions since Ruby no longer needs it.

If the grammars are dead or stubborn, I can always create a fork w/ rewrites for those interested.

I'll submit a PR for TLA+ and Liquidsoap too soon

@amaanq
Copy link
Member

amaanq commented Feb 9, 2024

Merging for now then I think we can remove C++ support in a month or two

@amaanq amaanq merged commit 6ccc1d1 into tree-sitter:master Feb 9, 2024
13 checks passed
@calebdw calebdw deleted the doc_scanner branch February 9, 2024 13:39
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.

None yet

3 participants