@willbooster/tree-sitter-c-sharp 1.0.16 → 1.0.18
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 +13 -5
- package/package.json +1 -1
- package/tree-sitter-c_sharp.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -52,7 +52,6 @@ module.exports = grammar({
|
|
|
52
52
|
|
|
53
53
|
[$.tuple_element, $.type_pattern],
|
|
54
54
|
[$.tuple_element, $.using_variable_declarator],
|
|
55
|
-
[$.tuple_element, $.declaration_expression],
|
|
56
55
|
|
|
57
56
|
[$.tuple_pattern, $.parameter],
|
|
58
57
|
[$.tuple_pattern, $._simple_name],
|
|
@@ -660,8 +659,7 @@ module.exports = grammar({
|
|
|
660
659
|
1,
|
|
661
660
|
seq(
|
|
662
661
|
optional(seq(field('name', $.identifier), ':')),
|
|
663
|
-
optional(choice('ref', 'out', 'in')),
|
|
664
|
-
choice($.expression, $.declaration_expression)
|
|
662
|
+
choice(seq(optional(choice('ref', 'out', 'in')), $.expression), seq('out', $.declaration_expression))
|
|
665
663
|
)
|
|
666
664
|
),
|
|
667
665
|
|
|
@@ -697,7 +695,7 @@ module.exports = grammar({
|
|
|
697
695
|
|
|
698
696
|
qualified_name: ($) => prec(PREC.DOT, seq(field('qualifier', $._name), '.', field('name', $._simple_name))),
|
|
699
697
|
|
|
700
|
-
generic_name: ($) => seq($.identifier, $.type_argument_list),
|
|
698
|
+
generic_name: ($) => prec.dynamic(1, seq($.identifier, $.type_argument_list)),
|
|
701
699
|
|
|
702
700
|
type_argument_list: ($) => seq('<', choice(repeat(','), commaSep1($.type)), '>'),
|
|
703
701
|
|
|
@@ -1611,7 +1609,17 @@ module.exports = grammar({
|
|
|
1611
1609
|
|
|
1612
1610
|
range_expression: ($) => prec.right(PREC.RANGE, seq(optional($.expression), '..', optional($.expression))),
|
|
1613
1611
|
|
|
1614
|
-
tuple_expression: ($) => seq('(', commaSep2($.argument), ')'),
|
|
1612
|
+
tuple_expression: ($) => seq('(', commaSep2(alias($._tuple_argument, $.argument)), ')'),
|
|
1613
|
+
|
|
1614
|
+
_tuple_argument: ($) =>
|
|
1615
|
+
prec(
|
|
1616
|
+
1,
|
|
1617
|
+
seq(
|
|
1618
|
+
optional(seq(field('name', $.identifier), ':')),
|
|
1619
|
+
optional(choice('ref', 'out', 'in')),
|
|
1620
|
+
choice($.expression, $.declaration_expression)
|
|
1621
|
+
)
|
|
1622
|
+
),
|
|
1615
1623
|
|
|
1616
1624
|
literal: ($) =>
|
|
1617
1625
|
choice(
|
package/package.json
CHANGED
package/tree-sitter-c_sharp.wasm
CHANGED
|
Binary file
|