Rename env_spec to expansion

This commit is contained in:
Camden Cheek 2021-05-10 17:22:52 -06:00
parent 4d4cef8121
commit 0c4af3e20f
No known key found for this signature in database
GPG key ID: 595BFFE3A04E48B9
6 changed files with 307 additions and 307 deletions

View file

@ -60,7 +60,7 @@ LABEL key="value${FOO}"
(label_pair
key: (unquoted_string)
value: (double_quoted_string
(env_spec)))))
(expansion)))))
==================
Stopsignal
@ -72,7 +72,7 @@ STOPSIGNAL $FOO
(source_file
(stopsignal_instruction
(env_spec)))
(expansion)))
==================
User
@ -85,8 +85,8 @@ USER foo$FOO:bar$BAR
(source_file
(user_instruction
user: (unquoted_string
(env_spec))
(expansion))
group: (unquoted_string
(env_spec))))
(expansion))))

View file

@ -9,9 +9,9 @@ ADD /$FOO ./${bar}
(source_file
(add_instruction
(path
(env_spec))
(expansion))
(path
(env_spec))))
(expansion))))
==================
Copy
@ -24,9 +24,9 @@ COPY $FOO ./${bar}
(source_file
(copy_instruction
(path
(env_spec))
(expansion))
(path
(env_spec))))
(expansion))))
==================
Special chars
@ -39,9 +39,9 @@ COPY $FOO ./${bar:-abc}
(source_file
(copy_instruction
(path
(env_spec))
(expansion))
(path
(env_spec))))
(expansion))))
==================
Env
@ -60,19 +60,19 @@ ENV TEST="foo$BAR" \
(env_pair
name: (unquoted_string)
value: (double_quoted_string
(env_spec)))
(expansion)))
(env_pair
name: (unquoted_string)
value: (unquoted_string
(env_spec)))
(expansion)))
(env_pair
name: (unquoted_string)
value: (double_quoted_string
(env_spec)))
(expansion)))
(env_pair
name: (unquoted_string)
value: (unquoted_string
(env_spec)))))
(expansion)))))
==================
Expose
@ -86,7 +86,7 @@ EXPOSE $FOO
(source_file
(expose_instruction
(expose_port
(env_spec))))
(expansion))))
==================
From
@ -100,13 +100,13 @@ FROM foo/$FOO:$BAR@sha256:$BAZ AS baz$QUX
(from_instruction
(image_spec
name: (image_name
(env_spec))
(expansion))
tag: (image_tag
(env_spec))
(expansion))
digest: (image_digest
(env_spec)))
(expansion)))
as: (image_alias
(env_spec))))
(expansion))))
==================
Label
@ -121,7 +121,7 @@ LABEL key="value$FOO"
(label_pair
key: (unquoted_string)
value: (double_quoted_string
(env_spec)))))
(expansion)))))
==================
Stopsignal
@ -133,7 +133,7 @@ STOPSIGNAL $FOO
(source_file
(stopsignal_instruction
(env_spec)))
(expansion)))
==================
User
@ -146,9 +146,9 @@ USER foo$FOO:bar${bar}
(source_file
(user_instruction
user: (unquoted_string
(env_spec))
(expansion))
group: (unquoted_string
(env_spec))))
(expansion))))
==================
Volume
@ -162,9 +162,9 @@ volume /my$FOO /my${bar}
(source_file
(volume_instruction
(path
(env_spec))
(expansion))
(path
(env_spec))))
(expansion))))
==================
Workdir
@ -177,7 +177,7 @@ WORKDIR /tmp/$FOO
(source_file
(workdir_instruction
(path
(env_spec))))
(expansion))))
==================
@ -192,6 +192,6 @@ ONBUILD ADD /$FOO ./${bar}
(onbuild_instruction
(add_instruction
(path
(env_spec))
(expansion))
(path
(env_spec)))))
(expansion)))))

View file

@ -124,7 +124,7 @@ module.exports = grammar({
_user_name_group: $ => repeat1(choice(
token.immediate(/[a-z][-a-z0-9_]*/),
$.env_spec,
$.expansion,
)),
workdir_instruction: $ => seq(
@ -160,7 +160,7 @@ module.exports = grammar({
_stopsignal_value: $ => repeat1(choice(
/[A-Z0-9]+/,
$.env_spec,
$.expansion,
)),
healthcheck_instruction: $ => seq(
@ -184,15 +184,15 @@ module.exports = grammar({
path: $ => seq(
choice(
/[^-\s]/, // cannot start with a '-' to avoid conflicts with params
$.env_spec,
$.expansion,
),
repeat(choice(
token.immediate(/[^\s\$]+/),
$.env_spec,
$.expansion,
)),
),
env_spec: $ => seq(
expansion: $ => seq(
'$',
repeat1(choice(
token.immediate(/[a-zA-Z][a-zA-Z0-9_]*/),
@ -218,7 +218,7 @@ module.exports = grammar({
"/udp",
)),
),
$.env_spec,
$.expansion,
),
label_pair: $ => seq(
@ -240,14 +240,14 @@ module.exports = grammar({
image_name: $ => repeat1(choice(
token.immediate(/[^@:\s\$]+/),
$.env_spec,
$.expansion,
)),
image_tag: $ => seq(
token.immediate(":"),
repeat1(choice(
token.immediate(/[^@\s\$]+/),
$.env_spec,
$.expansion,
))
),
@ -255,7 +255,7 @@ module.exports = grammar({
token.immediate("@"),
repeat1(choice(
token.immediate(/[a-zA-Z0-9:]+/),
$.env_spec,
$.expansion,
)),
),
@ -268,7 +268,7 @@ module.exports = grammar({
image_alias: $ => repeat1(choice(
/[-a-zA-Z0-9_]+/,
$.env_spec,
$.expansion,
)),
string_array: $ => seq(
@ -290,7 +290,7 @@ module.exports = grammar({
repeat(choice(
token.immediate(prec(1, /[^"\n\\\$]+/)),
$.escape_sequence,
$.env_spec,
$.expansion,
)),
'"'
),
@ -298,7 +298,7 @@ module.exports = grammar({
unquoted_string: $ => repeat1(choice(
token.immediate(/[^\s\n\"\\\$]+/),
token.immediate("\\ "),
$.env_spec,
$.expansion,
)),
escape_sequence: $ => token.immediate(seq(

View file

@ -536,7 +536,7 @@
},
{
"type": "SYMBOL",
"name": "env_spec"
"name": "expansion"
}
]
}
@ -686,7 +686,7 @@
},
{
"type": "SYMBOL",
"name": "env_spec"
"name": "expansion"
}
]
}
@ -768,7 +768,7 @@
},
{
"type": "SYMBOL",
"name": "env_spec"
"name": "expansion"
}
]
},
@ -786,14 +786,14 @@
},
{
"type": "SYMBOL",
"name": "env_spec"
"name": "expansion"
}
]
}
}
]
},
"env_spec": {
"expansion": {
"type": "SEQ",
"members": [
{
@ -911,7 +911,7 @@
},
{
"type": "SYMBOL",
"name": "env_spec"
"name": "expansion"
}
]
},
@ -1021,7 +1021,7 @@
},
{
"type": "SYMBOL",
"name": "env_spec"
"name": "expansion"
}
]
}
@ -1050,7 +1050,7 @@
},
{
"type": "SYMBOL",
"name": "env_spec"
"name": "expansion"
}
]
}
@ -1081,7 +1081,7 @@
},
{
"type": "SYMBOL",
"name": "env_spec"
"name": "expansion"
}
]
}
@ -1137,7 +1137,7 @@
},
{
"type": "SYMBOL",
"name": "env_spec"
"name": "expansion"
}
]
}
@ -1242,7 +1242,7 @@
},
{
"type": "SYMBOL",
"name": "env_spec"
"name": "expansion"
}
]
}
@ -1274,7 +1274,7 @@
},
{
"type": "SYMBOL",
"name": "env_spec"
"name": "expansion"
}
]
}

View file

@ -100,11 +100,11 @@
"required": false,
"types": [
{
"type": "env_spec",
"type": "escape_sequence",
"named": true
},
{
"type": "escape_sequence",
"type": "expansion",
"named": true
}
]
@ -175,7 +175,7 @@
}
},
{
"type": "env_spec",
"type": "expansion",
"named": true,
"fields": {}
},
@ -203,7 +203,7 @@
"required": false,
"types": [
{
"type": "env_spec",
"type": "expansion",
"named": true
}
]
@ -267,7 +267,7 @@
"required": false,
"types": [
{
"type": "env_spec",
"type": "expansion",
"named": true
}
]
@ -282,7 +282,7 @@
"required": false,
"types": [
{
"type": "env_spec",
"type": "expansion",
"named": true
}
]
@ -297,7 +297,7 @@
"required": false,
"types": [
{
"type": "env_spec",
"type": "expansion",
"named": true
}
]
@ -348,7 +348,7 @@
"required": false,
"types": [
{
"type": "env_spec",
"type": "expansion",
"named": true
}
]
@ -492,7 +492,7 @@
"required": false,
"types": [
{
"type": "env_spec",
"type": "expansion",
"named": true
}
]
@ -625,7 +625,7 @@
"required": false,
"types": [
{
"type": "env_spec",
"type": "expansion",
"named": true
}
]
@ -655,7 +655,7 @@
"required": false,
"types": [
{
"type": "env_spec",
"type": "expansion",
"named": true
}
]

File diff suppressed because it is too large Load diff