Merge pull request #44 from EricCrosson/43-support-multiple-parameters-to-add-and-copy
support multiple parameters to ADD and COPY
This commit is contained in:
commit
33e22c33bc
|
@ -38,3 +38,18 @@ ADD src1 src2 dst
|
|||
(path)
|
||||
(path)
|
||||
(path)))
|
||||
|
||||
==================
|
||||
Multiple params
|
||||
==================
|
||||
|
||||
ADD --chown=a:b --chmod=644 src dst
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(add_instruction
|
||||
(param)
|
||||
(param)
|
||||
(path)
|
||||
(path)))
|
||||
|
|
|
@ -38,3 +38,18 @@ COPY src1 src2 dst
|
|||
(path)
|
||||
(path)
|
||||
(path)))
|
||||
|
||||
==================
|
||||
Multiple params
|
||||
==================
|
||||
|
||||
COPY --chown=a:b --chmod=644 src dst
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(copy_instruction
|
||||
(param)
|
||||
(param)
|
||||
(path)
|
||||
(path)))
|
||||
|
|
|
@ -73,7 +73,7 @@ module.exports = grammar({
|
|||
add_instruction: ($) =>
|
||||
seq(
|
||||
alias(/[aA][dD][dD]/, "ADD"),
|
||||
optional($.param),
|
||||
repeat($.param),
|
||||
repeat1(
|
||||
seq($.path, $._non_newline_whitespace)
|
||||
),
|
||||
|
@ -83,7 +83,7 @@ module.exports = grammar({
|
|||
copy_instruction: ($) =>
|
||||
seq(
|
||||
alias(/[cC][oO][pP][yY]/, "COPY"),
|
||||
optional($.param),
|
||||
repeat($.param),
|
||||
repeat1(
|
||||
seq($.path, $._non_newline_whitespace)
|
||||
),
|
||||
|
|
|
@ -336,16 +336,11 @@
|
|||
"value": "ADD"
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "param"
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
"type": "REPEAT",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "param"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "REPEAT1",
|
||||
|
@ -382,16 +377,11 @@
|
|||
"value": "COPY"
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "param"
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
"type": "REPEAT",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "param"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "REPEAT1",
|
||||
|
|
8110
src/parser.c
8110
src/parser.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue