Add 'select' highlighting

This commit is contained in:
Bruno BELANYI 2024-04-08 22:13:23 +01:00
parent ddb4f693be
commit 3475d713d5
2 changed files with 18 additions and 0 deletions

View file

@ -53,6 +53,9 @@
(map_expression
(property
field: (identifier) @property))
(select_expression
"select" @keyword.conditional)
; }}}
; vim: sw=2 foldmethod=marker

15
test/highlight/select.bp Normal file
View file

@ -0,0 +1,15 @@
foo = select(soong_config_variable("my_namespace", "my_var"), {
// ^ keyword.conditional
"foo": unset,
default: "bar",
})
// It can still be used as a normal variable name
select = 42
// <- variable
// Or module property
foo {
select: 42,
// <- variable.member
}