simplify comment definition
This commit is contained in:
parent
23ca71644d
commit
d4f9099f9a
10
grammar.js
10
grammar.js
|
@ -50,10 +50,7 @@ module.exports = grammar({
|
||||||
),
|
),
|
||||||
|
|
||||||
label_instruction: ($) =>
|
label_instruction: ($) =>
|
||||||
seq(
|
seq(alias(/[lL][aA][bB][eE][lL]/, "LABEL"), repeat1($.label_pair)),
|
||||||
alias(/[lL][aA][bB][eE][lL]/, "LABEL"),
|
|
||||||
repeat1($.label_pair)
|
|
||||||
),
|
|
||||||
|
|
||||||
expose_instruction: ($) =>
|
expose_instruction: ($) =>
|
||||||
seq(
|
seq(
|
||||||
|
@ -214,8 +211,7 @@ module.exports = grammar({
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
image_name: ($) =>
|
image_name: ($) => repeat1(choice(/[^@:\s\$]+/, $.expansion)),
|
||||||
repeat1(choice(/[^@:\s\$]+/, $.expansion)),
|
|
||||||
|
|
||||||
image_tag: ($) =>
|
image_tag: ($) =>
|
||||||
seq(
|
seq(
|
||||||
|
@ -298,6 +294,6 @@ module.exports = grammar({
|
||||||
|
|
||||||
_non_newline_whitespace: ($) => /[\t ]+/,
|
_non_newline_whitespace: ($) => /[\t ]+/,
|
||||||
|
|
||||||
comment: ($) => seq("#", /.*/),
|
comment: ($) => /#.*/,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -1409,17 +1409,8 @@
|
||||||
"value": "[\\t ]+"
|
"value": "[\\t ]+"
|
||||||
},
|
},
|
||||||
"comment": {
|
"comment": {
|
||||||
"type": "SEQ",
|
"type": "PATTERN",
|
||||||
"members": [
|
"value": "#.*"
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "#"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "PATTERN",
|
|
||||||
"value": ".*"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"extras": [
|
"extras": [
|
||||||
|
|
6209
src/parser.c
6209
src/parser.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue