feat(bp): add support for Android Blueprint (#6626)

This commit is contained in:
Bruno BELANYI 2024-05-23 17:30:26 +02:00 committed by GitHub
parent 3e454836ce
commit 298a9dd4f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 125 additions and 0 deletions

6
queries/bp/folds.scm Normal file
View file

@ -0,0 +1,6 @@
[
(list_expression)
(map_expression)
(module)
(select_expression)
] @fold

55
queries/bp/highlights.scm Normal file
View file

@ -0,0 +1,55 @@
(comment) @comment @spell
(operator) @operator
(integer_literal
"-" @operator)
[
","
":"
] @punctuation.delimiter
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
(boolean_literal) @boolean
(integer_literal) @number
[
(raw_string_literal)
(interpreted_string_literal)
] @string
(escape_sequence) @string.escape
(identifier) @variable
(module
type: (identifier) @function.call)
(module
(property
field: (identifier) @variable.parameter))
[
(unset)
(default)
] @variable.builtin
(condition
name: (identifier) @function.builtin)
(map_expression
(property
field: (identifier) @property))
(select_expression
"select" @keyword.conditional)

38
queries/bp/indents.scm Normal file
View file

@ -0,0 +1,38 @@
(list_expression) @indent.begin
(list_expression
"]" @indent.branch)
(map_expression) @indent.begin
(map_expression
"}" @indent.branch)
(select_expression) @indent.begin
(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)
(module) @indent.begin
(module
")" @indent.branch)
(module
"}" @indent.branch)

View file

@ -0,0 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))

12
queries/bp/locals.scm Normal file
View file

@ -0,0 +1,12 @@
(module
(property
field: (identifier) @local.definition.parameter))
(map_expression
(property
field: (identifier) @local.definition.field))
(assignment
left: (identifier) @local.definition.var)
(identifier) @local.reference