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)
|
(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)
|
(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: ($) =>
|
add_instruction: ($) =>
|
||||||
seq(
|
seq(
|
||||||
alias(/[aA][dD][dD]/, "ADD"),
|
alias(/[aA][dD][dD]/, "ADD"),
|
||||||
optional($.param),
|
repeat($.param),
|
||||||
repeat1(
|
repeat1(
|
||||||
seq($.path, $._non_newline_whitespace)
|
seq($.path, $._non_newline_whitespace)
|
||||||
),
|
),
|
||||||
|
@ -83,7 +83,7 @@ module.exports = grammar({
|
||||||
copy_instruction: ($) =>
|
copy_instruction: ($) =>
|
||||||
seq(
|
seq(
|
||||||
alias(/[cC][oO][pP][yY]/, "COPY"),
|
alias(/[cC][oO][pP][yY]/, "COPY"),
|
||||||
optional($.param),
|
repeat($.param),
|
||||||
repeat1(
|
repeat1(
|
||||||
seq($.path, $._non_newline_whitespace)
|
seq($.path, $._non_newline_whitespace)
|
||||||
),
|
),
|
||||||
|
|
|
@ -336,16 +336,11 @@
|
||||||
"value": "ADD"
|
"value": "ADD"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "REPEAT",
|
||||||
"members": [
|
"content": {
|
||||||
{
|
"type": "SYMBOL",
|
||||||
"type": "SYMBOL",
|
"name": "param"
|
||||||
"name": "param"
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "BLANK"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "REPEAT1",
|
"type": "REPEAT1",
|
||||||
|
@ -382,16 +377,11 @@
|
||||||
"value": "COPY"
|
"value": "COPY"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "REPEAT",
|
||||||
"members": [
|
"content": {
|
||||||
{
|
"type": "SYMBOL",
|
||||||
"type": "SYMBOL",
|
"name": "param"
|
||||||
"name": "param"
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "BLANK"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "REPEAT1",
|
"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