Skip to content

Commit 7bb212b

Browse files
committed
feat: bump tree-sitter-c to 0.23.0
1 parent b1a4e2b commit 7bb212b

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

grammar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ module.exports = grammar(C, {
6666
[$._declaration_modifiers, $.attributed_statement],
6767
[$._top_level_item, $._top_level_statement],
6868
[$._block_item, $.statement],
69+
[$.type_qualifier, $.extension_expression],
6970

7071
// C++
7172
[$.template_function, $.template_type],
@@ -1189,7 +1190,7 @@ module.exports = grammar(C, {
11891190
// The compound_statement is added to parse macros taking statements as arguments, e.g. MYFORLOOP(1, 10, i, { foo(i); bar(i); })
11901191
argument_list: $ => seq(
11911192
'(',
1192-
commaSep(choice(seq(optional('__extension__'), $.expression), $.initializer_list, $.compound_statement)),
1193+
commaSep(choice($.expression, $.initializer_list, $.compound_statement)),
11931194
')',
11941195
),
11951196

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
"eslint": "^8.57.0",
4141
"eslint-config-google": "^0.14.0",
4242
"prebuildify": "^6.0.1",
43-
"tree-sitter-c": "^0.21.4",
44-
"tree-sitter-cli": "^0.22.6"
43+
"tree-sitter-c": "^0.23.0",
44+
"tree-sitter-cli": "^0.23.0"
4545
},
4646
"scripts": {
4747
"install": "node-gyp-build",

test/corpus/c/expressions.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ int main() {
157157
(string_literal
158158
(string_content))
159159
(number_literal)
160-
(identifier)))))))
160+
(extension_expression
161+
(identifier))))))))
161162

162163
================================================================================
163164
GNU inline assembly

0 commit comments

Comments
 (0)