From d2e4b5c172a109966c2ce0378f73df6cede39400 Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Wed, 23 Oct 2024 15:33:59 +0300 Subject: [PATCH] chore: regenerate json files and headers (#141) --- src/grammar.json | 1 + src/node-types.json | 1 + src/tree_sitter/alloc.h | 8 ++++---- src/tree_sitter/parser.h | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/grammar.json b/src/grammar.json index 25069a5..33a07cf 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1,4 +1,5 @@ { + "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json", "name": "vimdoc", "rules": { "help_file": { diff --git a/src/node-types.json b/src/node-types.json index 8f76d6f..ba23142 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -314,6 +314,7 @@ { "type": "help_file", "named": true, + "root": true, "fields": {}, "children": { "multiple": true, diff --git a/src/tree_sitter/alloc.h b/src/tree_sitter/alloc.h index 1f4466d..1abdd12 100644 --- a/src/tree_sitter/alloc.h +++ b/src/tree_sitter/alloc.h @@ -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 diff --git a/src/tree_sitter/parser.h b/src/tree_sitter/parser.h index 17f0e94..799f599 100644 --- a/src/tree_sitter/parser.h +++ b/src/tree_sitter/parser.h @@ -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 {