@hew-lang/tree-sitter-hew 1.2.2 → 1.2.3

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
@@ -221,8 +221,7 @@ export default grammar({
221
221
  ';',
222
222
  ),
223
223
 
224
- // TypeDecl (grammar.ebnf:47, 65): `type Name { ... }` whose body may hold
225
- // struct fields, variants, AND fn declarations (TypeBody). The alias form
224
+ // A type body holds fields; methods belong in a sibling impl block. The alias form
226
225
  // `type Name = Type;` is handled separately by `type_alias`.
227
226
  struct_declaration: $ => seq(
228
227
  'type',
@@ -235,7 +234,6 @@ export default grammar({
235
234
  struct_body: $ => seq('{', repeat(choice(
236
235
  $.struct_field,
237
236
  $.reserved_declaration,
238
- seq(optional($.visibility), $.function_declaration),
239
237
  )), '}'),
240
238
 
241
239
  // StructFieldDecl / WireStructFieldDecl (grammar.ebnf:68, 76):
@@ -801,6 +799,7 @@ export default grammar({
801
799
  primitive_type: $ => choice(
802
800
  'i8', 'i16', 'i32', 'i64', 'u8', 'u16', 'u32', 'u64', 'isize', 'usize',
803
801
  'f32', 'f64', 'bool', 'char', 'string', 'bytes', 'duration', 'instant',
802
+ 'timestamp',
804
803
  ),
805
804
 
806
805
  generic_type: $ => prec(1, seq($.identifier, $.type_arguments)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hew-lang/tree-sitter-hew",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Hew grammar for tree-sitter",
5
5
  "type": "module",
6
6
  "repository": {
package/src/grammar.json CHANGED
@@ -1080,27 +1080,6 @@
1080
1080
  {
1081
1081
  "type": "SYMBOL",
1082
1082
  "name": "reserved_declaration"
1083
- },
1084
- {
1085
- "type": "SEQ",
1086
- "members": [
1087
- {
1088
- "type": "CHOICE",
1089
- "members": [
1090
- {
1091
- "type": "SYMBOL",
1092
- "name": "visibility"
1093
- },
1094
- {
1095
- "type": "BLANK"
1096
- }
1097
- ]
1098
- },
1099
- {
1100
- "type": "SYMBOL",
1101
- "name": "function_declaration"
1102
- }
1103
- ]
1104
1083
  }
1105
1084
  ]
1106
1085
  }
@@ -4715,6 +4694,10 @@
4715
4694
  {
4716
4695
  "type": "STRING",
4717
4696
  "value": "instant"
4697
+ },
4698
+ {
4699
+ "type": "STRING",
4700
+ "value": "timestamp"
4718
4701
  }
4719
4702
  ]
4720
4703
  },
@@ -5705,10 +5705,6 @@
5705
5705
  "multiple": true,
5706
5706
  "required": false,
5707
5707
  "types": [
5708
- {
5709
- "type": "function_declaration",
5710
- "named": true
5711
- },
5712
5708
  {
5713
5709
  "type": "reserved_declaration",
5714
5710
  "named": true
@@ -5716,10 +5712,6 @@
5716
5712
  {
5717
5713
  "type": "struct_field",
5718
5714
  "named": true
5719
- },
5720
- {
5721
- "type": "visibility",
5722
- "named": true
5723
5715
  }
5724
5716
  ]
5725
5717
  }
@@ -7770,6 +7762,10 @@
7770
7762
  "type": "temporary",
7771
7763
  "named": false
7772
7764
  },
7765
+ {
7766
+ "type": "timestamp",
7767
+ "named": false
7768
+ },
7773
7769
  {
7774
7770
  "type": "trait",
7775
7771
  "named": false