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

feat: support building and installing parsers #1822

Closed
wants to merge 2 commits into from

Conversation

kylo252
Copy link

@kylo252 kylo252 commented Jul 27, 2022

Description

add TSParsers.cmake which provides:

  • download and (re-)generate parser from grammar
  • build parser (static and shared mode supported)
  • install parser

fixes: #408 #730 #1465 #1488 #1593 #1641 #1798
depends: #1821

examples

AddTSParser(Language c) # will use tree-sitter/tree-sitter-c
AddTSParser(
  LANGUAGE lua
  GIT_REPOSITORY https://github.com/MunifTanjim/tree-sitter-lua
  GIT_TAG main
)

- use cmake by default to build the core library to support all platforms
- if cmake is not found, then fallback to using cc directly
- pkg-config is supported as well as find_package
add TSParsers.cmake which provides:
- download and (re-)generate parser from grammar
- build parser (static and shared mode supported)
- install parser

examples:
```cmake
  AddTSParser(Language c) # will use tree-sitter/tree-sitter-c
  AddTSParser(
    LANGUAGE lua
    GIT_REPOSITORY https://github.com/MunifTanjim/tree-sitter-lua
    GIT_TAG main
  )
```
@dundargoc
Copy link
Member

Daddy Max dislikes cmake. There's no real reason to keep this open and give false hope. Thank you anyway.

@dundargoc dundargoc closed this Feb 8, 2024
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.

Pre-built WASM languages
2 participants