-
Notifications
You must be signed in to change notification settings - Fork 0
Add MATLAB support (CODY-6251) #1
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
base: master
Are you sure you want to change the base?
Conversation
e100622 to
731d6fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto generated from
curl -o matlab/grammar.js https://raw.githubusercontent.com/acristoffers/tree-sitter-matlab/main/grammar.js
cd matlab && tree-sitter generate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also genreated from tree-sitter generate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from oss matlab tree-sitter repo
curl -o scanner.c https://raw.githubusercontent.com/acristoffers/tree-sitter-matlab/main/src/scanner.c
beyang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you upstream these changes, as well?
|
upstream PR: smacker#190 |
Added complete MATLAB language support by configuring the MATLAB grammar in _automation/grammars.json, generating TreeSitter parser files (parser.c, parser.h) from the
acristoffers/tree-sitter-matlabgrammar, downloading the custom scanner (scanner.c), and creating standard Go bindings (binding.go, binding_test.go, go.mod) that follow the exact same pattern as all other languages in the repository, enabling Go programs to parse MATLAB code using TreeSitter.More Context
go-tree-sitter provides language parsing bindings, symf-private uses those bindings to extract and index symbols for search, and cody uses symf for code context retrieval.
To add MATLAB support, we