diff --git a/src/grammar.json b/src/grammar.json index 2fef08b..c3acc05 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": "cpp", "inherits": "c", "word": "identifier", diff --git a/src/node-types.json b/src/node-types.json index 9c4546a..eba0e9a 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -4415,10 +4415,6 @@ "multiple": true, "required": false, "types": [ - { - "type": "identifier", - "named": true - }, { "type": "optional_parameter_declaration", "named": true @@ -4427,10 +4423,6 @@ "type": "parameter_declaration", "named": true }, - { - "type": "variadic_parameter", - "named": true - }, { "type": "variadic_parameter_declaration", "named": true @@ -6495,6 +6487,7 @@ { "type": "translation_unit", "named": true, + "root": true, "fields": {}, "children": { "multiple": true, @@ -7027,11 +7020,6 @@ ] } }, - { - "type": "variadic_parameter", - "named": true, - "fields": {} - }, { "type": "variadic_parameter_declaration", "named": 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