fix(leo): update queries (#7086)

* small bugfixes of variables, records, and struct highlighting

* lockfile.json update

* fixed @constant bug, and added self.address, and network.id as builtins to highlight

* fixed associated function calls
This commit is contained in:
r001 2024-08-28 04:51:27 -03:00 committed by GitHub
parent 2eb50352c0
commit 5071ca777c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 12 deletions

View file

@ -393,7 +393,7 @@
"revision": "8a841fb20ce683bfbb3469e6ba67f2851cfdf94a"
},
"leo": {
"revision": "f5ecaaa869a845e689399092cb9a61feca66cf12"
"revision": "07fbb1d1dd193cf9995945e5412aff61c95c67e0"
},
"linkerscript": {
"revision": "f99011a3554213b654985a4b0a65b3b032ec4621"

View file

@ -1,7 +1,3 @@
(variable_identifier) @variable
(constant_identifier) @constant
[
"assert"
"assert_eq"
@ -31,6 +27,8 @@
"self" @variable.builtin
"network" @variable.builtin
"async" @keyword.coroutine
[
@ -115,7 +113,15 @@
(boolean_literal) @boolean
(constant_declaration
(identifier) @constant)
(identifier
(constant_identifier) @constant))
(variable
(constant_identifier) @constant)
(associated_constant) @constant
(variable) @variable
[
(program_id)
@ -124,7 +130,7 @@
;record declaration
(record_declaration
(identifier) @variable.member)
(identifier) @type.definition)
;struct component
(struct_component_declaration
@ -132,18 +138,26 @@
(type) @type
(associated_constant) @constant
[
(block_height)
(self_address)
(self_caller)
(self_signer)
(network_id)
] @constant.builtin
(free_function_call
(locator
(identifier) @function))
(associated_function_call
(named_type
(identifier
(constant_identifier) @function)))
(associated_function_call
(identifier) @function.call)
(record_type
(locator
(identifier) @variable.member))
@ -173,11 +187,10 @@
(identifier) @variable.parameter)
(struct_declaration
name: (identifier) @variable.member)
name: (identifier) @type.definition)
(variable_declaration
(identifier_or_identifiers
(identifier) @variable))
(identifier) @variable)
[
(address_literal)