From 3475d713d5f2f26f58a388f46696a6abd34970d7 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 8 Apr 2024 22:13:23 +0100 Subject: [PATCH] Add 'select' highlighting --- queries/highlights.scm | 3 +++ test/highlight/select.bp | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 test/highlight/select.bp diff --git a/queries/highlights.scm b/queries/highlights.scm index a28d844..b4cc660 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -53,6 +53,9 @@ (map_expression (property field: (identifier) @property)) + +(select_expression + "select" @keyword.conditional) ; }}} ; vim: sw=2 foldmethod=marker diff --git a/test/highlight/select.bp b/test/highlight/select.bp new file mode 100644 index 0000000..831608d --- /dev/null +++ b/test/highlight/select.bp @@ -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 +}