Skip to content

Commit

Permalink
remove unused args
Browse files Browse the repository at this point in the history
  • Loading branch information
camdencheek committed Apr 19, 2024
1 parent 40eceef commit b4a90e2
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ module.exports = grammar({
shell_instruction: ($) =>
seq(alias(/[sS][hH][eE][lL][lL]/, "SHELL"), $.json_string_array),

maintainer_instruction: ($) =>
maintainer_instruction: () =>
seq(
alias(/[mM][aA][iI][nN][tT][aA][iI][nN][eE][rR]/, "MAINTAINER"),
/.*/
),

cross_build_instruction: ($) =>
cross_build_instruction: () =>
seq(
alias(
/[cC][rR][oO][sS][sS]_[bB][uU][iI][lL][dD][a-zA-Z_]*/,
Expand Down Expand Up @@ -256,7 +256,7 @@ module.exports = grammar({
)
),

variable: ($) => token.immediate(/[a-zA-Z_][a-zA-Z0-9_]*/),
variable: () => token.immediate(/[a-zA-Z_][a-zA-Z0-9_]*/),

env_pair: ($) =>
seq(
Expand Down Expand Up @@ -287,7 +287,7 @@ module.exports = grammar({
_env_key: ($) =>
alias(/[a-zA-Z_][a-zA-Z0-9_]*/, $.unquoted_string),

expose_port: ($) => seq(/\d+(-\d+)?/, optional(choice("/tcp", "/udp"))),
expose_port: () => seq(/\d+(-\d+)?/, optional(choice("/tcp", "/udp"))),

label_pair: ($) =>
seq(
Expand Down Expand Up @@ -333,7 +333,7 @@ module.exports = grammar({
),

// Generic parsing of options passed right after an instruction name.
param: ($) =>
param: () =>
seq(
"--",
field("name", token.immediate(/[a-z][-a-z]*/)),
Expand All @@ -360,7 +360,7 @@ module.exports = grammar({
)
),

mount_param_param: ($) => seq(
mount_param_param: () => seq(
token.immediate(/[^\s=,]+/),
token.immediate("="),
token.immediate(/[^\s=,]+/)
Expand Down Expand Up @@ -405,12 +405,12 @@ module.exports = grammar({
)
),

line_continuation: ($) => /\\[ \t]*\n/,
required_line_continuation: ($) => "\\\n",
line_continuation: () => /\\[ \t]*\n/,
required_line_continuation: () => "\\\n",

_comment_line: ($) => seq(alias($._anon_comment, $.comment), "\n"),

_anon_comment: ($) => seq("#", /.*/),
_anon_comment: () => seq("#", /.*/),

json_string_array: ($) =>
seq(
Expand All @@ -435,7 +435,7 @@ module.exports = grammar({
'"'
),

json_escape_sequence: ($) => token.immediate(
json_escape_sequence: () => token.immediate(
/\\(?:["\\/bfnrt]|u[0-9A-Fa-f]{4})/
),

Expand Down Expand Up @@ -476,22 +476,22 @@ module.exports = grammar({
)
),

double_quoted_escape_sequence: ($) => token.immediate(
double_quoted_escape_sequence: () => token.immediate(
choice(
"\\\\",
"\\\""
)
),

single_quoted_escape_sequence: ($) => token.immediate(
single_quoted_escape_sequence: () => token.immediate(
choice(
"\\\\",
"\\'"
)
),

_non_newline_whitespace: ($) => token.immediate(/[\t ]+/),
_non_newline_whitespace: () => token.immediate(/[\t ]+/),

comment: ($) => /#.*/,
comment: () => /#.*/,
},
});

0 comments on commit b4a90e2

Please sign in to comment.