@willbooster/tree-sitter-c 46.0.0 → 47.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/grammar.js CHANGED
@@ -1386,7 +1386,7 @@ module.exports = Object.assign(
1386
1386
  $._type_identifier,
1387
1387
  alias('thread_local', sym('type_identifier')),
1388
1388
  alias(choice('signed', 'unsigned', 'long', 'short'), $.primitive_type),
1389
- $.primitive_type
1389
+ alias($.primitive_type, sym('type_identifier'))
1390
1390
  ),
1391
1391
 
1392
1392
  _abstract_declarator: ($) =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-c",
3
- "version": "46.0.0",
3
+ "version": "47.0.0",
4
4
  "description": "C grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "c",
@@ -1,4 +1,12 @@
1
1
  // @ts-check
2
2
 
3
3
  // oxlint-disable-next-line unicorn/prefer-module -- Tree-sitter loads grammar dependencies as CommonJS.
4
- module.exports = { primitiveTypeKeywords: ['_Bool', 'bool', 'char', 'int', 'float', 'double', 'void'] };
4
+ module.exports = {
5
+ primitiveTypeKeywords: [
6
+ '_Bool', 'bool', 'char', 'int', 'float', 'double', 'void',
7
+ '_Float16', '_Float32', '_Float64', '_Float128',
8
+ '_Float32x', '_Float64x', '_Float128x',
9
+ '_Decimal32', '_Decimal64', '_Decimal96', '_Decimal128', '_Decimal64x', '_Decimal128x',
10
+ '__fp16', '__float80', '__float128', '__ibm128',
11
+ ],
12
+ };
package/src/keywords.h CHANGED
@@ -12,7 +12,20 @@ static const char *const function_macro_keywords[] = {
12
12
  "_Bool",
13
13
  "_Complex",
14
14
  "_Countof",
15
+ "_Decimal128",
16
+ "_Decimal128x",
17
+ "_Decimal32",
18
+ "_Decimal64",
19
+ "_Decimal64x",
20
+ "_Decimal96",
15
21
  "_Defer",
22
+ "_Float128",
23
+ "_Float128x",
24
+ "_Float16",
25
+ "_Float32",
26
+ "_Float32x",
27
+ "_Float64",
28
+ "_Float64x",
16
29
  "_Generic",
17
30
  "_Imaginary",
18
31
  "_Nonnull",
@@ -35,7 +48,11 @@ static const char *const function_macro_keywords[] = {
35
48
  "__extension__",
36
49
  "__fastcall",
37
50
  "__finally",
51
+ "__float128",
52
+ "__float80",
38
53
  "__forceinline",
54
+ "__fp16",
55
+ "__ibm128",
39
56
  "__inline",
40
57
  "__inline__",
41
58
  "__leave",
@@ -151,8 +168,25 @@ static const char *const function_macro_type_keywords[] = {
151
168
  "_BitInt",
152
169
  "_Bool",
153
170
  "_Complex",
171
+ "_Decimal128",
172
+ "_Decimal128x",
173
+ "_Decimal32",
174
+ "_Decimal64",
175
+ "_Decimal64x",
176
+ "_Decimal96",
177
+ "_Float128",
178
+ "_Float128x",
179
+ "_Float16",
180
+ "_Float32",
181
+ "_Float32x",
182
+ "_Float64",
183
+ "_Float64x",
154
184
  "_Imaginary",
155
185
  "__complex__",
186
+ "__float128",
187
+ "__float80",
188
+ "__fp16",
189
+ "__ibm128",
156
190
  "__typeof",
157
191
  "__typeof__",
158
192
  "__typeof_unqual",
@@ -195,6 +229,23 @@ static const char *const function_macro_type_keywords[] = {
195
229
  };
196
230
  static const char *const function_macro_scalar_type_keywords[] = {
197
231
  "_Bool",
232
+ "_Decimal128",
233
+ "_Decimal128x",
234
+ "_Decimal32",
235
+ "_Decimal64",
236
+ "_Decimal64x",
237
+ "_Decimal96",
238
+ "_Float128",
239
+ "_Float128x",
240
+ "_Float16",
241
+ "_Float32",
242
+ "_Float32x",
243
+ "_Float64",
244
+ "_Float64x",
245
+ "__float128",
246
+ "__float80",
247
+ "__fp16",
248
+ "__ibm128",
198
249
  "bool",
199
250
  "char",
200
251
  "char16_t",
@@ -227,6 +278,19 @@ static const char *const function_macro_object_prefix_keywords[] = {
227
278
  "_Atomic",
228
279
  "_Bool",
229
280
  "_Complex",
281
+ "_Decimal128",
282
+ "_Decimal128x",
283
+ "_Decimal32",
284
+ "_Decimal64",
285
+ "_Decimal64x",
286
+ "_Decimal96",
287
+ "_Float128",
288
+ "_Float128x",
289
+ "_Float16",
290
+ "_Float32",
291
+ "_Float32x",
292
+ "_Float64",
293
+ "_Float64x",
230
294
  "_Imaginary",
231
295
  "_Nonnull",
232
296
  "_Noreturn",
@@ -241,7 +305,11 @@ static const char *const function_macro_object_prefix_keywords[] = {
241
305
  "__declspec",
242
306
  "__extension__",
243
307
  "__fastcall",
308
+ "__float128",
309
+ "__float80",
244
310
  "__forceinline",
311
+ "__fp16",
312
+ "__ibm128",
245
313
  "__inline",
246
314
  "__inline__",
247
315
  "__restrict__",
Binary file
package/tree-sitter.json CHANGED
@@ -28,7 +28,7 @@
28
28
  }
29
29
  ],
30
30
  "metadata": {
31
- "version": "46.0.0",
31
+ "version": "47.0.0",
32
32
  "license": "MIT",
33
33
  "description": "C grammar for tree-sitter",
34
34
  "authors": [