allow port ranges
This commit is contained in:
parent
cde2a8ea7f
commit
ecea7ac2c9
|
@ -287,7 +287,7 @@ module.exports = grammar({
|
||||||
_env_key: ($) =>
|
_env_key: ($) =>
|
||||||
alias(/[a-zA-Z_][a-zA-Z0-9_]*/, $.unquoted_string),
|
alias(/[a-zA-Z_][a-zA-Z0-9_]*/, $.unquoted_string),
|
||||||
|
|
||||||
expose_port: ($) => seq(/\d+/, optional(choice("/tcp", "/udp"))),
|
expose_port: ($) => seq(/\d+(-\d+)?/, optional(choice("/tcp", "/udp"))),
|
||||||
|
|
||||||
label_pair: ($) =>
|
label_pair: ($) =>
|
||||||
seq(
|
seq(
|
||||||
|
|
2
src/grammar.json
generated
2
src/grammar.json
generated
|
@ -1195,7 +1195,7 @@
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "PATTERN",
|
"type": "PATTERN",
|
||||||
"value": "\\d+"
|
"value": "\\d+(-\\d+)?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
|
|
1270
src/parser.c
generated
1270
src/parser.c
generated
File diff suppressed because it is too large
Load diff
|
@ -25,3 +25,16 @@ EXPOSE 80 90/tcp 100/udp
|
||||||
(expose_port)
|
(expose_port)
|
||||||
(expose_port)
|
(expose_port)
|
||||||
(expose_port)))
|
(expose_port)))
|
||||||
|
|
||||||
|
==================
|
||||||
|
Port range
|
||||||
|
==================
|
||||||
|
|
||||||
|
EXPOSE 9009-9010
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(source_file
|
||||||
|
(expose_instruction
|
||||||
|
(expose_port)))
|
||||||
|
|
Loading…
Reference in a new issue