@willbooster/tree-sitter-c 36.0.0 → 38.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 +1 -1
- package/package.json +1 -1
- package/src/grammarKeywords.cjs +1 -1
- package/src/keywords.h +4 -0
- package/tree-sitter-c.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -2127,7 +2127,7 @@ module.exports = Object.assign(
|
|
|
2127
2127
|
update_expression: ($) => {
|
|
2128
2128
|
const argument = field('argument', $.expression);
|
|
2129
2129
|
const operator = field('operator', choice('--', '++'));
|
|
2130
|
-
return prec.right(PREC.UNARY,
|
|
2130
|
+
return choice(prec.right(PREC.UNARY, seq(operator, argument)), prec.left(PREC.CALL, seq(argument, operator)));
|
|
2131
2131
|
},
|
|
2132
2132
|
|
|
2133
2133
|
cast_expression: ($) =>
|
package/package.json
CHANGED
package/src/grammarKeywords.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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', 'char', 'int', 'float', 'double', 'void'] };
|
|
4
|
+
module.exports = { primitiveTypeKeywords: ['_Bool', 'bool', 'char', 'int', 'float', 'double', 'void'] };
|
package/src/keywords.h
CHANGED
|
@@ -9,6 +9,7 @@ static const char *const function_macro_keywords[] = {
|
|
|
9
9
|
"_Alignof",
|
|
10
10
|
"_Atomic",
|
|
11
11
|
"_BitInt",
|
|
12
|
+
"_Bool",
|
|
12
13
|
"_Complex",
|
|
13
14
|
"_Countof",
|
|
14
15
|
"_Defer",
|
|
@@ -148,6 +149,7 @@ static const char *const function_macro_group_modifiers[] = {
|
|
|
148
149
|
static const char *const function_macro_type_keywords[] = {
|
|
149
150
|
"_Atomic",
|
|
150
151
|
"_BitInt",
|
|
152
|
+
"_Bool",
|
|
151
153
|
"_Complex",
|
|
152
154
|
"_Imaginary",
|
|
153
155
|
"__complex__",
|
|
@@ -192,6 +194,7 @@ static const char *const function_macro_type_keywords[] = {
|
|
|
192
194
|
"void",
|
|
193
195
|
};
|
|
194
196
|
static const char *const function_macro_scalar_type_keywords[] = {
|
|
197
|
+
"_Bool",
|
|
195
198
|
"bool",
|
|
196
199
|
"char",
|
|
197
200
|
"char16_t",
|
|
@@ -222,6 +225,7 @@ static const char *const function_macro_scalar_type_keywords[] = {
|
|
|
222
225
|
static const char *const function_macro_object_prefix_keywords[] = {
|
|
223
226
|
"_Alignas",
|
|
224
227
|
"_Atomic",
|
|
228
|
+
"_Bool",
|
|
225
229
|
"_Complex",
|
|
226
230
|
"_Imaginary",
|
|
227
231
|
"_Nonnull",
|
package/tree-sitter-c.wasm
CHANGED
|
Binary file
|