@willbooster/tree-sitter-java 8.0.2 → 8.0.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 +16 -10
- package/package.json +1 -1
- package/tree-sitter-java.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -337,7 +337,13 @@ module.exports = grammar({
|
|
|
337
337
|
'(',
|
|
338
338
|
sep1(field('type', $._type), '&'),
|
|
339
339
|
')',
|
|
340
|
-
field('value', choice(
|
|
340
|
+
field('value', choice(
|
|
341
|
+
$.primary_expression,
|
|
342
|
+
alias($._unary_complement_expression, $.unary_expression),
|
|
343
|
+
$.cast_expression,
|
|
344
|
+
$.switch_expression,
|
|
345
|
+
$.lambda_expression,
|
|
346
|
+
)),
|
|
341
347
|
),
|
|
342
348
|
)),
|
|
343
349
|
|
|
@@ -419,17 +425,17 @@ module.exports = grammar({
|
|
|
419
425
|
field('alternative', $.expression),
|
|
420
426
|
)),
|
|
421
427
|
|
|
422
|
-
unary_expression: $ => choice(
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
['~', PREC.UNARY],
|
|
427
|
-
].map(([operator, precedence]) =>
|
|
428
|
-
prec.left(precedence, seq(
|
|
429
|
-
// @ts-ignore
|
|
430
|
-
field('operator', operator),
|
|
428
|
+
unary_expression: $ => choice(
|
|
429
|
+
$._unary_complement_expression,
|
|
430
|
+
prec.left(PREC.UNARY, seq(
|
|
431
|
+
field('operator', choice('+', '-')),
|
|
431
432
|
field('operand', $.expression),
|
|
432
433
|
)),
|
|
434
|
+
),
|
|
435
|
+
|
|
436
|
+
_unary_complement_expression: $ => prec.left(PREC.UNARY, seq(
|
|
437
|
+
field('operator', choice('~', '!')),
|
|
438
|
+
field('operand', $.expression),
|
|
433
439
|
)),
|
|
434
440
|
|
|
435
441
|
update_expression: $ => prec.left(PREC.UNARY, choice(
|
package/package.json
CHANGED
package/tree-sitter-java.wasm
CHANGED
|
Binary file
|