tree-sitter-familymarkup 1.10.0 → 1.11.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
@@ -36,7 +36,7 @@ module.exports = grammar({
36
36
 
37
37
  relation: $ => seq(
38
38
  field('sources', $.sources),
39
- field('arrow', $._arrows),
39
+ field('arrow', choice($.eq, $.arrow)),
40
40
  field('label', optional($.words)),
41
41
  optional($._nl),
42
42
  field('targets', optional($.targets)),
@@ -86,7 +86,9 @@ module.exports = grammar({
86
86
  words: _ => /\p{Ll}([\p{Ll}'"\s]*[\p{Ll}'"])?/u,
87
87
  _words: $ => alias($.words, '_words'),
88
88
 
89
- _arrows: _ => choice('=', '<->', '->', '<-', '-'),
89
+ eq: _ => "=",
90
+
91
+ arrow: _ => choice('<->', '->', '<-', '-'),
90
92
  },
91
93
  });
92
94
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tree-sitter-familymarkup",
3
3
  "description": "Tree sitter for FamilyMarkup",
4
- "version": "1.10.0",
4
+ "version": "1.11.0",
5
5
  "main": "bindings/node",
6
6
  "types": "bindings/node",
7
7
  "scripts": {
@@ -21,7 +21,8 @@
21
21
  )
22
22
 
23
23
  (relation
24
- arrow: "="
24
+ (sources)
25
+ (eq)
25
26
  (targets
26
27
  (name_def
27
28
  (new_surname
package/queries.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "highlights": "(family_name\n (name) @class.declaration.family_name\n\n (name_aliases\n (name) @class.declaration.family_name.alias\n )?\n)\n\n(name_ref\n (name) @property.static.name.ref\n (surname) @class.family_name.ref\n)\n\n(name_def\n (name) @property.static.name.ref\n (surname)? @class.family_name.ref\n)\n\n(sources\n (name) @property.static.name.ref\n)\n\n(relation\n arrow: \"=\"\n (targets\n (name_def\n (new_surname\n (name) @class.family_name.ref\n )?\n (name) @property.declaration.static.name.def\n (name_aliases\n (name) @property.declaration.static.name.def.alias\n )?\n (surname)? @class.family_name.ref\n )\n )\n)\n\n(unknown) @string.unknown\n\n(comment) @comment\n\n(num) @number.targets\n\n(sources delimiter: _ @punctuation.delimiter.sources)\n(targets delimiter: _ @punctuation.delimiter.targets)\n\n\"+\" @operator.sources.join\n\n(relation arrow: _ @operator.arrow)\n\n(relation label: _ @string.label)\n"
2
+ "highlights": "(family_name\n (name) @class.declaration.family_name\n\n (name_aliases\n (name) @class.declaration.family_name.alias\n )?\n)\n\n(name_ref\n (name) @property.static.name.ref\n (surname) @class.family_name.ref\n)\n\n(name_def\n (name) @property.static.name.ref\n (surname)? @class.family_name.ref\n)\n\n(sources\n (name) @property.static.name.ref\n)\n\n(relation\n (sources)\n (eq)\n (targets\n (name_def\n (new_surname\n (name) @class.family_name.ref\n )?\n (name) @property.declaration.static.name.def\n (name_aliases\n (name) @property.declaration.static.name.def.alias\n )?\n (surname)? @class.family_name.ref\n )\n )\n)\n\n(unknown) @string.unknown\n\n(comment) @comment\n\n(num) @number.targets\n\n(sources delimiter: _ @punctuation.delimiter.sources)\n(targets delimiter: _ @punctuation.delimiter.targets)\n\n\"+\" @operator.sources.join\n\n(relation arrow: _ @operator.arrow)\n\n(relation label: _ @string.label)\n"
3
3
  }
package/src/grammar.json CHANGED
@@ -222,8 +222,17 @@
222
222
  "type": "FIELD",
223
223
  "name": "arrow",
224
224
  "content": {
225
- "type": "SYMBOL",
226
- "name": "_arrows"
225
+ "type": "CHOICE",
226
+ "members": [
227
+ {
228
+ "type": "SYMBOL",
229
+ "name": "eq"
230
+ },
231
+ {
232
+ "type": "SYMBOL",
233
+ "name": "arrow"
234
+ }
235
+ ]
227
236
  }
228
237
  },
229
238
  {
@@ -716,13 +725,13 @@
716
725
  "named": false,
717
726
  "value": "_words"
718
727
  },
719
- "_arrows": {
728
+ "eq": {
729
+ "type": "STRING",
730
+ "value": "="
731
+ },
732
+ "arrow": {
720
733
  "type": "CHOICE",
721
734
  "members": [
722
- {
723
- "type": "STRING",
724
- "value": "="
725
- },
726
735
  {
727
736
  "type": "STRING",
728
737
  "value": "<->"
@@ -1,4 +1,9 @@
1
1
  [
2
+ {
3
+ "type": "arrow",
4
+ "named": true,
5
+ "fields": {}
6
+ },
2
7
  {
3
8
  "type": "comment",
4
9
  "named": true,
@@ -187,24 +192,12 @@
187
192
  "required": true,
188
193
  "types": [
189
194
  {
190
- "type": "-",
191
- "named": false
192
- },
193
- {
194
- "type": "->",
195
- "named": false
196
- },
197
- {
198
- "type": "<-",
199
- "named": false
200
- },
201
- {
202
- "type": "<->",
203
- "named": false
195
+ "type": "arrow",
196
+ "named": true
204
197
  },
205
198
  {
206
- "type": "=",
207
- "named": false
199
+ "type": "eq",
200
+ "named": true
208
201
  }
209
202
  ]
210
203
  },
@@ -404,10 +397,6 @@
404
397
  "type": "<->",
405
398
  "named": false
406
399
  },
407
- {
408
- "type": "=",
409
- "named": false
410
- },
411
400
  {
412
401
  "type": "?",
413
402
  "named": false
@@ -416,6 +405,10 @@
416
405
  "type": "_words",
417
406
  "named": false
418
407
  },
408
+ {
409
+ "type": "eq",
410
+ "named": true
411
+ },
419
412
  {
420
413
  "type": "name",
421
414
  "named": true