mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(tact): update parser and queries
This commit is contained in:
parent
0c7a0ddaf4
commit
09700b88b4
4 changed files with 30 additions and 29 deletions
|
|
@ -711,7 +711,7 @@
|
|||
"revision": "b1170880c61355aaf38fc06f4af7d3c55abdabc4"
|
||||
},
|
||||
"tact": {
|
||||
"revision": "034df2162ed7b654efd999942e266be713c7cde0"
|
||||
"revision": "91cc49a83f4f0b3a756bf7d0e65403a9cf757003"
|
||||
},
|
||||
"tcl": {
|
||||
"revision": "8784024358c233efd0f3a6fd9e7a3c5852e628bc"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[
|
||||
; import …
|
||||
(import_statement)+
|
||||
(import)+
|
||||
; (…, …)
|
||||
(parameter_list)
|
||||
(argument_list)
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@
|
|||
|
||||
; string.special.path
|
||||
; -------------------
|
||||
(import_statement
|
||||
(import
|
||||
library: (string) @string.special.path)
|
||||
|
||||
; boolean
|
||||
|
|
@ -117,7 +117,10 @@
|
|||
|
||||
; constant
|
||||
; --------
|
||||
(constant
|
||||
(global_constant
|
||||
name: (identifier) @constant)
|
||||
|
||||
(storage_constant
|
||||
name: (identifier) @constant)
|
||||
|
||||
; constant.builtin
|
||||
|
|
@ -142,17 +145,12 @@
|
|||
(field_access_expression
|
||||
name: (identifier) @variable.member)
|
||||
|
||||
(trait_body
|
||||
(constant
|
||||
name: (identifier) @variable.member))
|
||||
|
||||
(contract_body
|
||||
(constant
|
||||
name: (identifier) @variable.member))
|
||||
|
||||
(field
|
||||
name: (identifier) @variable.member)
|
||||
|
||||
(storage_variable
|
||||
name: (identifier) @variable.member)
|
||||
|
||||
; number
|
||||
; ------
|
||||
(integer) @number
|
||||
|
|
@ -248,7 +246,7 @@
|
|||
(native_function
|
||||
name: (identifier) @function)
|
||||
|
||||
(static_function
|
||||
(global_function
|
||||
name: (identifier) @function)
|
||||
|
||||
(func_identifier) @function
|
||||
|
|
@ -267,7 +265,7 @@
|
|||
(external_function
|
||||
"external" @function.method)
|
||||
|
||||
(function
|
||||
(storage_function
|
||||
name: (identifier) @function.method)
|
||||
|
||||
; function.call
|
||||
|
|
@ -289,19 +287,19 @@
|
|||
"contractAddress" "contractAddressExt" "emit" "cell" "ton" "dump" "dumpStack" "beginString"
|
||||
"beginComment" "beginTailString" "beginStringFromBuilder" "beginCell" "emptyCell" "randomInt"
|
||||
"random" "checkSignature" "checkDataSignature" "sha256" "min" "max" "abs" "pow" "pow2" "throw"
|
||||
"nativeThrowWhen" "nativeThrowUnless" "getConfigParam" "nativeRandomize" "nativeRandomizeLt"
|
||||
"nativeThrowIf" "nativeThrowUnless" "getConfigParam" "nativeRandomize" "nativeRandomizeLt"
|
||||
"nativePrepareRandom" "nativeRandom" "nativeRandomInterval" "nativeReserve"))
|
||||
|
||||
; comment
|
||||
; -------
|
||||
(comment) @comment @spell
|
||||
|
||||
((comment) @comment.documentation
|
||||
(#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$"))
|
||||
|
||||
; attribute
|
||||
; ---------
|
||||
[
|
||||
"@name"
|
||||
"@interface"
|
||||
] @attribute
|
||||
|
||||
; comment
|
||||
; -------
|
||||
(comment) @comment @spell
|
||||
|
||||
((comment) @comment.documentation
|
||||
(#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$"))
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
; Scopes @local.scope
|
||||
; -------------------------
|
||||
[
|
||||
(static_function)
|
||||
(global_function)
|
||||
(init_function)
|
||||
(bounced_function)
|
||||
(receive_function)
|
||||
(external_function)
|
||||
(function)
|
||||
(storage_function)
|
||||
(block_statement)
|
||||
] @local.scope
|
||||
|
||||
|
|
@ -17,11 +17,14 @@
|
|||
name: (identifier) @local.definition.var)
|
||||
|
||||
; constants
|
||||
(constant
|
||||
(global_constant
|
||||
name: (identifier) @local.definition.constant)
|
||||
|
||||
(storage_constant
|
||||
name: (identifier) @local.definition.constant)
|
||||
|
||||
; functions
|
||||
(static_function
|
||||
(global_function
|
||||
name: (identifier) @local.definition.function
|
||||
(#set! definition.var.scope parent))
|
||||
|
||||
|
|
@ -42,7 +45,7 @@
|
|||
"external" @local.definition.method
|
||||
(#set! definition.var.scope parent))
|
||||
|
||||
(function
|
||||
(storage_function
|
||||
name: (identifier) @local.definition.method
|
||||
(#set! definition.var.scope parent))
|
||||
|
||||
|
|
@ -53,12 +56,12 @@
|
|||
; user-defined types (structs and messages)
|
||||
(type_identifier) @local.definition.type
|
||||
|
||||
; fields (and properties)
|
||||
; fields (of messages and structs)
|
||||
(field
|
||||
name: (identifier) @local.definition.field)
|
||||
|
||||
; imports
|
||||
(import_statement
|
||||
(import
|
||||
(string) @local.definition.import)
|
||||
|
||||
; References @local.reference
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue