Skip to content

Commit

Permalink
fix: remove unnecessary empty string usage
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Nov 2, 2024
1 parent 83aec5f commit 557ec01
Show file tree
Hide file tree
Showing 5 changed files with 366,110 additions and 368,157 deletions.
16 changes: 16 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "SwiftTreeSitter",
"repositoryURL": "https://github.com/ChimeHQ/SwiftTreeSitter",
"state": {
"branch": null,
"revision": "2599e95310b3159641469d8a21baf2d3d200e61f",
"version": "0.8.0"
}
}
]
},
"version": 1
}
15 changes: 5 additions & 10 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ module.exports = grammar({
optional($._statements),
optional(
choice(
seq(/__END__[\r\n]/, $.uninterpreted),
seq('__END__', alias('', $.uninterpreted)),
seq(/__END__/, $.uninterpreted),
),
),
),
Expand Down Expand Up @@ -1240,8 +1239,7 @@ module.exports = grammar({
*
* @param {RuleOrLiteral} separator
*
* @return {ChoiceRule}
*
* @returns {ChoiceRule}
*/
function sep(rule, separator) {
return optional(sep1(rule, separator));
Expand All @@ -1254,8 +1252,7 @@ function sep(rule, separator) {
*
* @param {RuleOrLiteral} separator
*
* @return {SeqRule}
*
* @returns {SeqRule}
*/
function sep1(rule, separator) {
return seq(rule, repeat(seq(separator, rule)));
Expand All @@ -1266,8 +1263,7 @@ function sep1(rule, separator) {
*
* @param {RuleOrLiteral} rule
*
* @return {SeqRule}
*
* @returns {SeqRule}
*/
function commaSep1(rule) {
return sep1(rule, ',');
Expand All @@ -1278,8 +1274,7 @@ function commaSep1(rule) {
*
* @param {RuleOrLiteral} rule
*
* @return {ChoiceRule}
*
* @returns {ChoiceRule}
*/
function commaSep(rule) {
return optional(commaSep1(rule));
Expand Down
20 changes: 1 addition & 19 deletions src/grammar.json

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

4 changes: 0 additions & 4 deletions src/node-types.json

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

Loading

0 comments on commit 557ec01

Please sign in to comment.