way to get parser for typescript/tsx #231
Replies: 2 comments
-
pip install tree-sitter tree-sitter-typescript from tree_sitter import Language, Parser
from tree_sitter_typescript import language_typescript # or language_tsx
parser = Parser()
parser.set_language(Language(language_typescript(), "typescript"))
# or with py-tree-sitter 0.22 (not yet released):
# parser = Parser()
# parser.language = Language(language_typescript()) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ObserverOfTime
-
Thanks! It works now! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
build_library works for both typescript/typescript and typescript/tsx
But I am unable to find way to get the typescript/tsx parser.
what is right api ?
Beta Was this translation helpful? Give feedback.
All reactions