WIP: Add indentation queries for multi-value 'select'
Some checks failed
ci/woodpecker/push/check Pipeline failed

This commit is contained in:
Bruno BELANYI 2024-04-23 16:36:11 +00:00
parent 626ffea712
commit aa06bb8b9f
2 changed files with 32 additions and 0 deletions

View file

@ -11,6 +11,16 @@
(select_expression
")" @indent.branch)
(select_value
"(" @indent.begin)
(select_value
")" @indent.branch)
; (select_pattern
; "(" @indent.begin)
; (select_pattern
; ")" @indent.branch)
(select_cases) @indent.begin
(select_cases
"}" @indent.branch)

View file

@ -26,3 +26,25 @@ foo = select(
default: 0,
}
)
foo = select((
arch(),
os(),
), {
(default, default): [],
})
foo = select(
(arch(), os()),
{
(default, default): [],
}
)
// We're really getting into more and more unlikely choices here...
foo = select((arch(), os()), {
(
default,
default,
): [],
})