Add 'any' select pattern
This commit is contained in:
parent
2326d709fb
commit
970241b323
|
@ -163,6 +163,7 @@ module.exports = grammar({
|
|||
_select_pattern: ($) => choice(
|
||||
$._string_literal,
|
||||
$.boolean_literal,
|
||||
alias("any", $.any),
|
||||
alias("default", $.default),
|
||||
),
|
||||
|
||||
|
|
9
src/grammar.json
generated
9
src/grammar.json
generated
|
@ -735,6 +735,15 @@
|
|||
"type": "SYMBOL",
|
||||
"name": "boolean_literal"
|
||||
},
|
||||
{
|
||||
"type": "ALIAS",
|
||||
"content": {
|
||||
"type": "STRING",
|
||||
"value": "any"
|
||||
},
|
||||
"named": true,
|
||||
"value": "any"
|
||||
},
|
||||
{
|
||||
"type": "ALIAS",
|
||||
"content": {
|
||||
|
|
8
src/node-types.json
generated
8
src/node-types.json
generated
|
@ -483,6 +483,10 @@
|
|||
"multiple": true,
|
||||
"required": true,
|
||||
"types": [
|
||||
{
|
||||
"type": "any",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "boolean_literal",
|
||||
"named": true
|
||||
|
@ -584,6 +588,10 @@
|
|||
"type": "]",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "any",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "default",
|
||||
"named": true
|
||||
|
|
1874
src/parser.c
generated
1874
src/parser.c
generated
File diff suppressed because it is too large
Load diff
|
@ -4,6 +4,7 @@ Select
|
|||
|
||||
foo = select(release_variable("RELEASE_TEST"), {
|
||||
"d": "d2",
|
||||
any: unset,
|
||||
default: unset,
|
||||
})
|
||||
|
||||
|
@ -23,6 +24,10 @@ foo = select(release_variable("RELEASE_TEST"), {
|
|||
(select_pattern
|
||||
(interpreted_string_literal))
|
||||
(interpreted_string_literal))
|
||||
(select_case
|
||||
(select_pattern
|
||||
(any))
|
||||
(unset))
|
||||
(select_case
|
||||
(select_pattern
|
||||
(default))
|
||||
|
|
Loading…
Reference in a new issue