mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 08:50:11 -04:00
feat(tact): update parser and queries (#7196)
This commit is contained in:
parent
009e981c30
commit
9d2acd4997
4 changed files with 22 additions and 19 deletions
|
|
@ -13,4 +13,6 @@
|
||||||
(trait_body)
|
(trait_body)
|
||||||
(function_body)
|
(function_body)
|
||||||
(block_statement)
|
(block_statement)
|
||||||
|
(asm_function_body)
|
||||||
|
(asm_list)
|
||||||
] @fold
|
] @fold
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@
|
||||||
"^"
|
"^"
|
||||||
"&&"
|
"&&"
|
||||||
"||"
|
"||"
|
||||||
|
"->"
|
||||||
] @operator
|
] @operator
|
||||||
|
|
||||||
; constructor
|
; constructor
|
||||||
|
|
@ -76,7 +77,7 @@
|
||||||
; type.builtin
|
; type.builtin
|
||||||
; ------------
|
; ------------
|
||||||
((identifier) @type.builtin
|
((identifier) @type.builtin
|
||||||
(#eq? @type.builtin "SendParameters"))
|
(#any-of? @type.builtin "Context" "SendParameters" "StateInit" "StdAddress" "VarAddress"))
|
||||||
|
|
||||||
(bounced_type
|
(bounced_type
|
||||||
"bounced" @type.builtin
|
"bounced" @type.builtin
|
||||||
|
|
@ -93,10 +94,7 @@
|
||||||
|
|
||||||
(tlb_serialization
|
(tlb_serialization
|
||||||
"as" @keyword
|
"as" @keyword
|
||||||
type: (identifier) @type.builtin
|
type: (identifier) @type.builtin)
|
||||||
(#any-of? @type.builtin
|
|
||||||
"int8" "int16" "int32" "int64" "int128" "int256" "int257" "uint8" "uint16" "uint32" "uint64"
|
|
||||||
"uint128" "uint256" "coins" "remaining" "bytes32" "bytes64"))
|
|
||||||
|
|
||||||
; string
|
; string
|
||||||
; ------
|
; ------
|
||||||
|
|
@ -130,8 +128,9 @@
|
||||||
((identifier) @constant.builtin
|
((identifier) @constant.builtin
|
||||||
(#any-of? @constant.builtin
|
(#any-of? @constant.builtin
|
||||||
"SendBounceIfActionFail" "SendPayGasSeparately" "SendIgnoreErrors" "SendDestroyIfZero"
|
"SendBounceIfActionFail" "SendPayGasSeparately" "SendIgnoreErrors" "SendDestroyIfZero"
|
||||||
"SendRemainingValue" "SendRemainingBalance" "ReserveExact" "ReserveAllExcept" "ReserveAtMost"
|
"SendRemainingValue" "SendRemainingBalance" "SendOnlyEstimateFee" "ReserveExact"
|
||||||
"ReserveAddOriginalBalance" "ReserveInvertSign" "ReserveBounceIfActionFail"))
|
"ReserveAllExcept" "ReserveAtMost" "ReserveAddOriginalBalance" "ReserveInvertSign"
|
||||||
|
"ReserveBounceIfActionFail"))
|
||||||
|
|
||||||
; property
|
; property
|
||||||
; --------
|
; --------
|
||||||
|
|
@ -175,6 +174,7 @@
|
||||||
[
|
[
|
||||||
"fun"
|
"fun"
|
||||||
"native"
|
"native"
|
||||||
|
"asm"
|
||||||
] @keyword.function
|
] @keyword.function
|
||||||
|
|
||||||
; keyword.operator
|
; keyword.operator
|
||||||
|
|
@ -242,6 +242,9 @@
|
||||||
(native_function
|
(native_function
|
||||||
name: (identifier) @function)
|
name: (identifier) @function)
|
||||||
|
|
||||||
|
(asm_function
|
||||||
|
name: (identifier) @function)
|
||||||
|
|
||||||
(global_function
|
(global_function
|
||||||
name: (identifier) @function)
|
name: (identifier) @function)
|
||||||
|
|
||||||
|
|
@ -274,18 +277,6 @@
|
||||||
(method_call_expression
|
(method_call_expression
|
||||||
name: (identifier) @function.method.call)
|
name: (identifier) @function.method.call)
|
||||||
|
|
||||||
; function.builtin
|
|
||||||
; ----------------
|
|
||||||
(static_call_expression
|
|
||||||
name: (identifier) @function.builtin
|
|
||||||
(#any-of? @function.builtin
|
|
||||||
"log" "log2" "send" "sender" "require" "now" "myBalance" "myAddress" "newAddress"
|
|
||||||
"contractAddress" "contractAddressExt" "emit" "cell" "ton" "dump" "dumpStack" "beginString"
|
|
||||||
"beginComment" "beginTailString" "beginStringFromBuilder" "beginCell" "emptyCell" "randomInt"
|
|
||||||
"random" "checkSignature" "checkDataSignature" "sha256" "min" "max" "abs" "pow" "pow2" "throw"
|
|
||||||
"nativeThrowIf" "nativeThrowUnless" "getConfigParam" "nativeRandomize" "nativeRandomizeLt"
|
|
||||||
"nativePrepareRandom" "nativeRandom" "nativeRandomInterval" "nativeReserve"))
|
|
||||||
|
|
||||||
; attribute
|
; attribute
|
||||||
; ---------
|
; ---------
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@
|
||||||
(trait_body)
|
(trait_body)
|
||||||
(function_body)
|
(function_body)
|
||||||
(block_statement)
|
(block_statement)
|
||||||
|
(asm_function_body)
|
||||||
|
(asm_list)
|
||||||
; misc.
|
; misc.
|
||||||
(binary_expression)
|
(binary_expression)
|
||||||
(ternary_expression)
|
(ternary_expression)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
; Scopes @local.scope
|
; Scopes @local.scope
|
||||||
; -------------------------
|
; -------------------------
|
||||||
[
|
[
|
||||||
|
(asm_function)
|
||||||
(global_function)
|
(global_function)
|
||||||
(init_function)
|
(init_function)
|
||||||
(bounced_function)
|
(bounced_function)
|
||||||
|
|
@ -13,6 +14,9 @@
|
||||||
; Definitions @local.definition
|
; Definitions @local.definition
|
||||||
; ------------------------------
|
; ------------------------------
|
||||||
; variables
|
; variables
|
||||||
|
(storage_variable
|
||||||
|
name: (identifier) @local.definition.var)
|
||||||
|
|
||||||
(let_statement
|
(let_statement
|
||||||
name: (identifier) @local.definition.var)
|
name: (identifier) @local.definition.var)
|
||||||
|
|
||||||
|
|
@ -24,6 +28,10 @@
|
||||||
name: (identifier) @local.definition.constant)
|
name: (identifier) @local.definition.constant)
|
||||||
|
|
||||||
; functions
|
; functions
|
||||||
|
(asm_function
|
||||||
|
name: (identifier) @local.definition.function
|
||||||
|
(#set! definition.var.scope parent))
|
||||||
|
|
||||||
(global_function
|
(global_function
|
||||||
name: (identifier) @local.definition.function
|
name: (identifier) @local.definition.function
|
||||||
(#set! definition.var.scope parent))
|
(#set! definition.var.scope parent))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue