Skip to content

Commit e8e4326

Browse files
committed
Fixed not permitting empty compile-time switch body.
1 parent 09dcaf5 commit e8e4326

File tree

6 files changed

+97844
-97125
lines changed

6 files changed

+97844
-97125
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Final grammar for C3 0.6.7.
66

77
### Changes
88
- Revert tree-sitter ABI version back to 14
9+
- Fixed not permitting empty compile-time switch body
910

1011
## 0.3.1
1112

4.92 KB
Binary file not shown.

grammar.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -982,10 +982,9 @@ module.exports = grammar({
982982
ct_switch_cond: $ => seq('(', choice($._constant_expr, $._type_optional), ')'),
983983

984984
_ct_switch: $ => seq('$switch', optional($.ct_switch_cond)),
985-
_ct_switch_body: $ => repeat1($.ct_case_stmt),
986985
ct_switch_stmt: $ => seq(
987986
$._ct_switch,
988-
$._ct_switch_body,
987+
repeat($.ct_case_stmt),
989988
'$endswitch',
990989
),
991990

src/grammar.json

Lines changed: 5 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node-types.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)