-
Notifications
You must be signed in to change notification settings - Fork 148
Add tree sitter to auto api #984
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
Add tree sitter to auto api #984
Conversation
working tree-sitter instance and finally figured out how to query
Adds better comments and rms console logs
Adds tree-sitter to parse and query the file's AST instead of relying on regex. Unfortunately, because type declarations are object-like and type declarations can have have objects, regex cannot handle the recursive nature of TS types. An oversight that has been corrected.
|
919eada
to
218e302
Compare
218e302
to
aedb443
Compare
commit: |
Okay I'm merging as is, I'll make a follow up PR to cleanup a bit. |
* feat(auto-api): adds tree sitter & query working tree-sitter instance and finally figured out how to query * feat(auto-api): saves tree-sitter query as obj * fix(auto-api): general minor improvements Adds better comments and rms console logs * feat(auto api): use AST instead of regex Adds tree-sitter to parse and query the file's AST instead of relying on regex. Unfortunately, because type declarations are object-like and type declarations can have have objects, regex cannot handle the recursive nature of TS types. An oversight that has been corrected. * fix(auto api): removes comment syntax from table text * fix(auto api): adds dependencies
* feat(auto-api): adds tree sitter & query working tree-sitter instance and finally figured out how to query * feat(auto-api): saves tree-sitter query as obj * fix(auto-api): general minor improvements Adds better comments and rms console logs * feat(auto api): use AST instead of regex Adds tree-sitter to parse and query the file's AST instead of relying on regex. Unfortunately, because type declarations are object-like and type declarations can have have objects, regex cannot handle the recursive nature of TS types. An oversight that has been corrected. * fix(auto api): removes comment syntax from table text * fix(auto api): adds dependencies
… by the Github API (#987) * feat: Convert from to a dedicated docs page driven by the Gthub API * Add tree sitter to auto api (#984) * feat(auto-api): adds tree sitter & query working tree-sitter instance and finally figured out how to query * feat(auto-api): saves tree-sitter query as obj * fix(auto-api): general minor improvements Adds better comments and rms console logs * feat(auto api): use AST instead of regex Adds tree-sitter to parse and query the file's AST instead of relying on regex. Unfortunately, because type declarations are object-like and type declarations can have have objects, regex cannot handle the recursive nature of TS types. An oversight that has been corrected. * fix(auto api): removes comment syntax from table text * fix(auto api): adds dependencies * feat: Convert from to a dedicated docs page driven by the Gthub API * fix: preview --------- Co-authored-by: TheMcnafaha <102767512+TheMcnafaha@users.noreply.github.com> Co-authored-by: maiieul <maieul.chevalier@gmail.com>
What is it?
Why is it needed?
Current auto api cannot handle nested object-like structures.
The solution does add two new dependencies: tree-sitter and tree-sitter-typescript
Checklist:
pnpm change
and documented my changes