tree-sitter-java-orchard 0.5.9 → 0.5.10

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
@@ -242,7 +242,7 @@ export default grammar({
242
242
  $.switch_expression,
243
243
  ),
244
244
 
245
- cast_expression: $ => prec(PREC.CAST, choice(
245
+ cast_expression: $ => prec.right(PREC.CAST, choice(
246
246
  seq(
247
247
  '(',
248
248
  field('type', $._type),
@@ -352,12 +352,12 @@ export default grammar({
352
352
  field('operand', $.expression),
353
353
  )),
354
354
 
355
- update_expression: $ => prec.left(PREC.UNARY, choice(
355
+ update_expression: $ => prec.right(PREC.UNARY, choice(
356
356
  // Post (in|de)crement is evaluated before pre (in|de)crement
357
- seq($.expression, '++'),
358
- seq($.expression, '--'),
359
- seq('++', $.expression),
360
- seq('--', $.expression),
357
+ seq($.primary_expression, '++'),
358
+ seq($.primary_expression, '--'),
359
+ seq('++', $.primary_expression),
360
+ seq('--', $.primary_expression),
361
361
  )),
362
362
 
363
363
  primary_expression: $ => choice(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tree-sitter-java-orchard",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "description": "Java grammar for tree-sitter",
5
5
  "type": "module",
6
6
  "repository": {
package/src/grammar.json CHANGED
@@ -1362,7 +1362,7 @@
1362
1362
  ]
1363
1363
  },
1364
1364
  "cast_expression": {
1365
- "type": "PREC",
1365
+ "type": "PREC_RIGHT",
1366
1366
  "value": 14,
1367
1367
  "content": {
1368
1368
  "type": "CHOICE",
@@ -2520,7 +2520,7 @@
2520
2520
  }
2521
2521
  },
2522
2522
  "update_expression": {
2523
- "type": "PREC_LEFT",
2523
+ "type": "PREC_RIGHT",
2524
2524
  "value": 15,
2525
2525
  "content": {
2526
2526
  "type": "CHOICE",
@@ -2530,7 +2530,7 @@
2530
2530
  "members": [
2531
2531
  {
2532
2532
  "type": "SYMBOL",
2533
- "name": "expression"
2533
+ "name": "primary_expression"
2534
2534
  },
2535
2535
  {
2536
2536
  "type": "STRING",
@@ -2543,7 +2543,7 @@
2543
2543
  "members": [
2544
2544
  {
2545
2545
  "type": "SYMBOL",
2546
- "name": "expression"
2546
+ "name": "primary_expression"
2547
2547
  },
2548
2548
  {
2549
2549
  "type": "STRING",
@@ -2560,7 +2560,7 @@
2560
2560
  },
2561
2561
  {
2562
2562
  "type": "SYMBOL",
2563
- "name": "expression"
2563
+ "name": "primary_expression"
2564
2564
  }
2565
2565
  ]
2566
2566
  },
@@ -2573,7 +2573,7 @@
2573
2573
  },
2574
2574
  {
2575
2575
  "type": "SYMBOL",
2576
- "name": "expression"
2576
+ "name": "primary_expression"
2577
2577
  }
2578
2578
  ]
2579
2579
  }
@@ -4001,7 +4001,7 @@
4001
4001
  "required": true,
4002
4002
  "types": [
4003
4003
  {
4004
- "type": "expression",
4004
+ "type": "primary_expression",
4005
4005
  "named": true
4006
4006
  }
4007
4007
  ]