From 73b0797891390e36f0cf10122f4df40ae1dffa52 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 8 Apr 2024 22:13:23 +0100 Subject: [PATCH] Add builtins highlighting --- queries/highlights.scm | 8 ++++++++ test/highlight/builtins.bp | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 test/highlight/builtins.bp diff --git a/queries/highlights.scm b/queries/highlights.scm index b4cc660..7422e6f 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -49,6 +49,14 @@ field: (identifier) @variable.member)) ; }}} +; Built-ins {{{ +[ + (unset) + "default" +] @variable.builtin +(selection_type) @function.builtin +; }}} + ; Expressions {{{ (map_expression (property diff --git a/test/highlight/builtins.bp b/test/highlight/builtins.bp new file mode 100644 index 0000000..73b32e3 --- /dev/null +++ b/test/highlight/builtins.bp @@ -0,0 +1,8 @@ +foo = select(soong_config_variable("my_namespace", "my_var"), { + // ^ function.builtin + "foo": unset, + // ^ variable.builtin + default: select(variant("VARIANT"), {}), + // <- variable.builtin + // ^ function.builtin +})