Add support for maintainer instruction
This commit is contained in:
parent
550e4cf0a3
commit
ca57ec244a
10
corpus/maintainer.txt
Normal file
10
corpus/maintainer.txt
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
==================
|
||||||
|
Simple
|
||||||
|
==================
|
||||||
|
|
||||||
|
Maintainer camden@ccheek.com
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(source_file
|
||||||
|
(maintainer_instruction))
|
|
@ -24,6 +24,7 @@ module.exports = grammar({
|
||||||
$.stopsignal_instruction,
|
$.stopsignal_instruction,
|
||||||
$.healthcheck_instruction,
|
$.healthcheck_instruction,
|
||||||
$.shell_instruction,
|
$.shell_instruction,
|
||||||
|
$.maintainer_instruction,
|
||||||
),
|
),
|
||||||
|
|
||||||
from_instruction: $ => seq(
|
from_instruction: $ => seq(
|
||||||
|
@ -183,6 +184,11 @@ module.exports = grammar({
|
||||||
$._non_newline_whitespace,
|
$._non_newline_whitespace,
|
||||||
$.string_array,
|
$.string_array,
|
||||||
),
|
),
|
||||||
|
|
||||||
|
maintainer_instruction: $ => seq(
|
||||||
|
alias(/[mM][aA][iI][nN][tT][aA][iI][nN][eE][rR]/, "MAINTAINER"),
|
||||||
|
/.*/,
|
||||||
|
),
|
||||||
|
|
||||||
path: $ => seq(
|
path: $ => seq(
|
||||||
choice(
|
choice(
|
||||||
|
|
|
@ -87,6 +87,10 @@
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "shell_instruction"
|
"name": "shell_instruction"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "maintainer_instruction"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -770,6 +774,24 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"maintainer_instruction": {
|
||||||
|
"type": "SEQ",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
|
"type": "ALIAS",
|
||||||
|
"content": {
|
||||||
|
"type": "PATTERN",
|
||||||
|
"value": "[mM][aA][iI][nN][tT][aA][iI][nN][eE][rR]"
|
||||||
|
},
|
||||||
|
"named": false,
|
||||||
|
"value": "MAINTAINER"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PATTERN",
|
||||||
|
"value": ".*"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"path": {
|
"path": {
|
||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
"members": [
|
"members": [
|
||||||
|
|
|
@ -409,6 +409,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "maintainer_instruction",
|
||||||
|
"named": true,
|
||||||
|
"fields": {}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "onbuild_instruction",
|
"type": "onbuild_instruction",
|
||||||
"named": true,
|
"named": true,
|
||||||
|
@ -457,6 +462,10 @@
|
||||||
"type": "label_instruction",
|
"type": "label_instruction",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "maintainer_instruction",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "onbuild_instruction",
|
"type": "onbuild_instruction",
|
||||||
"named": true
|
"named": true
|
||||||
|
@ -618,6 +627,10 @@
|
||||||
"type": "label_instruction",
|
"type": "label_instruction",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "maintainer_instruction",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "onbuild_instruction",
|
"type": "onbuild_instruction",
|
||||||
"named": true
|
"named": true
|
||||||
|
@ -842,6 +855,10 @@
|
||||||
"type": "LABEL",
|
"type": "LABEL",
|
||||||
"named": false
|
"named": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "MAINTAINER",
|
||||||
|
"named": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "NONE",
|
"type": "NONE",
|
||||||
"named": false
|
"named": false
|
||||||
|
|
8341
src/parser.c
8341
src/parser.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue