Skip to content

Commit 778e585

Browse files
committed
Separate the block rule into a hidden rule
1 parent 34b8cd4 commit 778e585

File tree

4 files changed

+5258
-5194
lines changed

4 files changed

+5258
-5194
lines changed

grammar.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ module.exports = grammar({
3838
name: "lua",
3939

4040
rules: {
41-
chunk: ($) => optional(alias($.block, "block")),
41+
chunk: ($) => optional($._block),
4242

43-
block: ($) =>
43+
block: ($) => $._block,
44+
45+
_block: ($) =>
4446
choice(
4547
$.return_statement,
4648
seq(repeat1($._statement), optional($.return_statement)),

src/grammar.json

Lines changed: 6 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node-types.json

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)