Skip to content

Commit

Permalink
Improve the placement of the end of blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
irh committed Apr 23, 2024
1 parent f35837b commit 944534c
Show file tree
Hide file tree
Showing 4 changed files with 116,573 additions and 116,514 deletions.
8 changes: 5 additions & 3 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module.exports = grammar({
$._raw_string_end,
$._interpolation_start,
$._interpolation_end,
$._eof,
$.error_sentinel,
],

Expand All @@ -61,6 +62,7 @@ module.exports = grammar({
)
),
$._block_end,
$._eof,
),

_term: $ => choice(
Expand Down Expand Up @@ -323,9 +325,9 @@ module.exports = grammar({

number: _ => token(
choice(
// Ints
// Ints
seq(/\d+/, optional(/e[+-]?\d+/)),
// Floats
// Floats
seq(/\d*/, '.', /\d+/, optional(/e[+-]?\d+/)),
// Binary
/0b[01]+/,
Expand Down Expand Up @@ -696,4 +698,4 @@ function keyword_expression($, keyword) {
keyword,
optional(seq(repeat($._indented_line), $._expression)),
));
}
}
8 changes: 8 additions & 0 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 944534c

Please sign in to comment.