tree-sitter-familymarkup 1.8.3 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
package/grammar.js CHANGED
@@ -51,7 +51,7 @@ module.exports = grammar({
51
51
  field('delimiter', choice(',', $._nl, $._words))
52
52
  ),
53
53
 
54
- name_ref: $ => seq(alias($.name, $.surname), $.name),
54
+ name_ref: $ => seq($.name, alias($.name, $.surname)),
55
55
 
56
56
  family_name: $ => seq(
57
57
  field('name', $.name),
@@ -78,7 +78,7 @@ module.exports = grammar({
78
78
  comment: _ => seq(choice('*', '/', '#'), optional(/[^\n]+/)),
79
79
 
80
80
  name: _ => /\p{Lu}[\p{L}\-\d'"]*/u,
81
-
81
+
82
82
  unknown: _ => choice('?', /\p{L}[\p{L}\-\d'" ]*\?/u),
83
83
  num_unknown: $ => seq($.num, $.unknown),
84
84
 
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.8.3",
4
+ "version": "1.9.1",
5
5
  "main": "bindings/node",
6
6
  "types": "bindings/node",
7
7
  "scripts": {
@@ -34,7 +34,7 @@
34
34
  "node-gyp-build": "^4.8.0"
35
35
  },
36
36
  "peerDependencies": {
37
- "tree-sitter": "^0.21.0"
37
+ "tree-sitter": "0.21.x || 0.22.x"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
40
  "tree_sitter": {
package/src/grammar.json CHANGED
@@ -443,6 +443,10 @@
443
443
  "name_ref": {
444
444
  "type": "SEQ",
445
445
  "members": [
446
+ {
447
+ "type": "SYMBOL",
448
+ "name": "name"
449
+ },
446
450
  {
447
451
  "type": "ALIAS",
448
452
  "content": {
@@ -451,10 +455,6 @@
451
455
  },
452
456
  "named": true,
453
457
  "value": "surname"
454
- },
455
- {
456
- "type": "SYMBOL",
457
- "name": "name"
458
458
  }
459
459
  ]
460
460
  },
package/src/parser.c CHANGED
@@ -452,7 +452,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = {
452
452
  static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = {
453
453
  [0] = {0},
454
454
  [3] = {
455
- [0] = alias_sym_surname,
455
+ [1] = alias_sym_surname,
456
456
  },
457
457
  [4] = {
458
458
  [0] = anon_alias_sym__words,