feat: improve language bindings
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
This commit is contained in:
parent
d0d349c02b
commit
9e5bf6591f
32 changed files with 1132 additions and 195 deletions
|
|
@ -51,7 +51,7 @@ Here's an example of a simple C program that uses the Tree-sitter [JSON parser](
|
|||
|
||||
// Declare the `tree_sitter_json` function, which is
|
||||
// implemented by the `tree-sitter-json` library.
|
||||
TSLanguage *tree_sitter_json();
|
||||
extern const TSLanguage *tree_sitter_json();
|
||||
|
||||
int main() {
|
||||
// Create a parser.
|
||||
|
|
@ -326,9 +326,9 @@ Conceptually, it can be represented by three syntax trees with overlapping range
|
|||
#include <tree_sitter/api.h>
|
||||
|
||||
// These functions are each implemented in their own repo.
|
||||
const TSLanguage *tree_sitter_embedded_template();
|
||||
const TSLanguage *tree_sitter_html();
|
||||
const TSLanguage *tree_sitter_ruby();
|
||||
extern const TSLanguage *tree_sitter_embedded_template();
|
||||
extern const TSLanguage *tree_sitter_html();
|
||||
extern const TSLanguage *tree_sitter_ruby();
|
||||
|
||||
int main(int argc, const char **argv) {
|
||||
const char *text = argv[1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue