favor return over return _ (void return); newline/closing terminates

This commit is contained in:
2026-07-14 19:07:37 +02:00
parent eac5b32738
commit 471896b48a
19 changed files with 92266 additions and 94923 deletions
+3 -5
View File
@@ -262,15 +262,13 @@ module.exports = grammar({
expression_statement: $ => $.expression,
return_statement: $ => seq(
return_statement: $ => prec.right(seq(
'return',
repeat($._newline),
field('value', $._value),
),
optional(field('value', $._value)),
)),
yield_statement: $ => seq(
'yield',
repeat($._newline),
optional(seq(':', field('label', $.identifier))),
field('value', $._value),
),