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