chore: generate with tree-sitter 0.24.2

This commit is contained in:
Uy Ha 2024-10-07 08:54:29 +00:00
parent 5c493f3722
commit f2569dd1fc
7 changed files with 6573 additions and 6544 deletions

View file

@ -18,14 +18,13 @@
"optional": true
}
},
"tree-sitter": [
{
"scope": "source.cmake",
"file-types": [
"cmake",
"CMakeLists.txt"
]
}
"files": [
"grammar.js",
"binding.gyp",
"prebuilds/**",
"bindings/node/*",
"queries/*",
"src/**"
],
"devDependencies": {
"tree-sitter-cli": "^0.21.0",
@ -34,13 +33,5 @@
"scripts": {
"install": "node-gyp-build",
"prebuildify": "prebuildify --napi --strip"
},
"files": [
"grammar.js",
"binding.gyp",
"prebuilds/**",
"bindings/node/*",
"queries/*",
"src/**"
]
}
}
}

1
src/grammar.json generated
View file

@ -1,4 +1,5 @@
{
"$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
"name": "cmake",
"rules": {
"source_file": {

1
src/node-types.json generated
View file

@ -568,6 +568,7 @@
{
"type": "source_file",
"named": true,
"root": true,
"fields": {},
"children": {
"multiple": true,

13044
src/parser.c generated

File diff suppressed because it is too large Load diff

View file

@ -12,10 +12,10 @@ extern "C" {
// Allow clients to override allocation functions
#ifdef TREE_SITTER_REUSE_ALLOCATOR
extern void *(*ts_current_malloc)(size_t);
extern void *(*ts_current_calloc)(size_t, size_t);
extern void *(*ts_current_realloc)(void *, size_t);
extern void (*ts_current_free)(void *);
extern void *(*ts_current_malloc)(size_t size);
extern void *(*ts_current_calloc)(size_t count, size_t size);
extern void *(*ts_current_realloc)(void *ptr, size_t size);
extern void (*ts_current_free)(void *ptr);
#ifndef ts_malloc
#define ts_malloc ts_current_malloc

View file

@ -47,6 +47,7 @@ struct TSLexer {
uint32_t (*get_column)(TSLexer *);
bool (*is_at_included_range_start)(const TSLexer *);
bool (*eof)(const TSLexer *);
void (*log)(const TSLexer *, const char *, ...);
};
typedef enum {

35
tree-sitter.json Normal file
View file

@ -0,0 +1,35 @@
{
"grammars": [
{
"name": "cmake",
"camelcase": "Cmake",
"scope": "source.cmake",
"path": ".",
"file-types": [
"cmake",
"CMakeLists.txt"
]
}
],
"metadata": {
"version": "0.5.0",
"license": "MIT",
"description": "CMake grammar for tree-sitter",
"authors": [
{
"name": "Uy Ha"
}
],
"links": {
"repository": "https://github.com/tree-sitter/tree-sitter-cmake"
}
},
"bindings": {
"c": true,
"go": true,
"node": true,
"python": true,
"rust": true,
"swift": true
}
}