Skip to content

Commit 5db731e

Browse files
committed
fix: Allow for empty files
1 parent 6bc22f2 commit 5db731e

File tree

5 files changed

+37916
-38109
lines changed

5 files changed

+37916
-38109
lines changed

grammar.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,18 @@ module.exports = grammar({
3434
// all this does is make $._newline of the LAST $._statement
3535
// optional.
3636
optional(
37-
seq(
38-
repeat(
39-
seq(
40-
choice(optional($._statement), $._indentation),
41-
seq(optional($._indentation), $._newline),
37+
choice(
38+
seq(
39+
repeat(
40+
seq(
41+
choice(optional($._statement), $._indentation),
42+
seq(optional($._indentation), $._newline),
43+
),
4244
),
45+
$._statement,
46+
optional($._newline),
4347
),
44-
$._statement,
45-
optional($._newline),
48+
$._newline,
4649
),
4750
),
4851

package.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-lock.yaml

Lines changed: 0 additions & 227 deletions
This file was deleted.

0 commit comments

Comments
 (0)