chore(bicep): update queries and add scanner

This commit is contained in:
Amaan Qureshi 2024-02-02 00:12:17 -05:00 committed by Christian Clason
parent d2b4563230
commit 8b99311ca1
4 changed files with 29 additions and 15 deletions

View file

@ -36,7 +36,7 @@
"revision": "ccfd77db0ed799b6c22c214fe9d2937f47bc8b34"
},
"bicep": {
"revision": "48a00c254671b5e847e615442678f4f3f5aa1e43"
"revision": "b33f29563e102f5cdf70c3bb5fd65a1bf4cc2456"
},
"bitbake": {
"revision": "7e0e2ac6f1d0da1a91ab84f35edddfdfece54f1a"

View file

@ -180,7 +180,7 @@ list.bibtex = {
list.bicep = {
install_info = {
url = "https://github.com/amaanq/tree-sitter-bicep",
files = { "src/parser.c" },
files = { "src/parser.c", "src/scanner.c" },
},
maintainers = { "@amaanq" },
}

View file

@ -22,6 +22,9 @@
(call_expression
function: (identifier) @function.call)
(user_defined_function
name: (identifier) @function)
; Properties
(object_property
(identifier) @property
@ -58,12 +61,6 @@
"="
(identifier) @type)
(type_declaration
(identifier)
"="
(array_type
(identifier) @type))
(type
(identifier) @type)
@ -89,6 +86,10 @@
(member_expression
object: (identifier) @variable.parameter)))
(parameter
.
(identifier) @variable.parameter)
; Variables
(variable_declaration
(identifier) @variable
@ -137,8 +138,14 @@
"targetScope"
"type"
"var"
"using"
"test"
] @keyword
"func" @keyword.function
"assert" @keyword.exception
; Operators
[
"+"
@ -160,19 +167,20 @@
"??"
"="
"!"
".?"
] @operator
(subscript_expression
"?" @operator)
(nullable_type
"?" @operator)
"in" @keyword.operator
; Literals
(string) @string
(import_string
"'" @string
(import_name) @module
"@" @string.special.symbol
(import_version) @string.special)
(escape_sequence) @string.escape
(number) @number
@ -204,6 +212,7 @@
[
"."
":"
"::"
"=>"
] @punctuation.delimiter

View file

@ -36,7 +36,8 @@
(compatible_identifier) @local.definition.field
(_))
(import_name) @local.definition.import
(user_defined_function
name: (identifier) @local.definition.function)
(module_declaration
(identifier) @local.definition.namespace)
@ -45,6 +46,10 @@
(identifier) @local.definition.parameter
(_))
(parameter
.
(identifier) @local.definition.parameter)
(type_declaration
(identifier) @local.definition.type
(_))