Merge pull request #14 from returntocorp/mj-copy-multiple-files
Allow copying multiple files with ADD/COPY
This commit is contained in:
commit
4e5f9a0a61
|
@ -25,3 +25,16 @@ ADD --chown=a:b /src ./dst
|
||||||
(path)
|
(path)
|
||||||
(path)))
|
(path)))
|
||||||
|
|
||||||
|
==================
|
||||||
|
Multiple files
|
||||||
|
==================
|
||||||
|
|
||||||
|
ADD src1 src2 dst
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(source_file
|
||||||
|
(add_instruction
|
||||||
|
(path)
|
||||||
|
(path)
|
||||||
|
(path)))
|
||||||
|
|
|
@ -25,3 +25,16 @@ COPY --chown=a:b /src ./dst
|
||||||
(path)
|
(path)
|
||||||
(path)))
|
(path)))
|
||||||
|
|
||||||
|
==================
|
||||||
|
Multiple files
|
||||||
|
==================
|
||||||
|
|
||||||
|
COPY src1 src2 dst
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(source_file
|
||||||
|
(copy_instruction
|
||||||
|
(path)
|
||||||
|
(path)
|
||||||
|
(path)))
|
||||||
|
|
10
grammar.js
10
grammar.js
|
@ -68,8 +68,9 @@ module.exports = grammar({
|
||||||
seq(
|
seq(
|
||||||
alias(/[aA][dD][dD]/, "ADD"),
|
alias(/[aA][dD][dD]/, "ADD"),
|
||||||
optional($.param),
|
optional($.param),
|
||||||
$.path,
|
repeat1(
|
||||||
$._non_newline_whitespace,
|
seq($.path, $._non_newline_whitespace)
|
||||||
|
),
|
||||||
$.path
|
$.path
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -77,8 +78,9 @@ module.exports = grammar({
|
||||||
seq(
|
seq(
|
||||||
alias(/[cC][oO][pP][yY]/, "COPY"),
|
alias(/[cC][oO][pP][yY]/, "COPY"),
|
||||||
optional($.param),
|
optional($.param),
|
||||||
$.path,
|
repeat1(
|
||||||
$._non_newline_whitespace,
|
seq($.path, $._non_newline_whitespace)
|
||||||
|
),
|
||||||
$.path
|
$.path
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
|
@ -332,12 +332,20 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "REPEAT1",
|
||||||
"name": "path"
|
"content": {
|
||||||
},
|
"type": "SEQ",
|
||||||
{
|
"members": [
|
||||||
"type": "SYMBOL",
|
{
|
||||||
"name": "_non_newline_whitespace"
|
"type": "SYMBOL",
|
||||||
|
"name": "path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_non_newline_whitespace"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
|
@ -370,12 +378,20 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "REPEAT1",
|
||||||
"name": "path"
|
"content": {
|
||||||
},
|
"type": "SEQ",
|
||||||
{
|
"members": [
|
||||||
"type": "SYMBOL",
|
{
|
||||||
"name": "_non_newline_whitespace"
|
"type": "SYMBOL",
|
||||||
|
"name": "path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_non_newline_whitespace"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
|
|
6886
src/parser.c
6886
src/parser.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue