mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 10:20:11 -04:00
feat(tact): update parser and queries (#7731)
This commit is contained in:
parent
1a314a58d6
commit
6d1a8e6fdb
5 changed files with 62 additions and 10 deletions
|
|
@ -795,7 +795,7 @@
|
||||||
"revision": "b1170880c61355aaf38fc06f4af7d3c55abdabc4"
|
"revision": "b1170880c61355aaf38fc06f4af7d3c55abdabc4"
|
||||||
},
|
},
|
||||||
"tact": {
|
"tact": {
|
||||||
"revision": "83e264928fa194b7283428527259e88e54205264"
|
"revision": "a19be2d4c1956e12facfc717e28f13a6ad0860e0"
|
||||||
},
|
},
|
||||||
"tcl": {
|
"tcl": {
|
||||||
"revision": "98015ebe182d94e5a4439e32ffd91beaac32fcb9"
|
"revision": "98015ebe182d94e5a4439e32ffd91beaac32fcb9"
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
(argument_list)
|
(argument_list)
|
||||||
; {…, …}
|
; {…, …}
|
||||||
(instance_argument_list)
|
(instance_argument_list)
|
||||||
|
(destruct_bind_list)
|
||||||
; {…; …}
|
; {…; …}
|
||||||
(message_body)
|
(message_body)
|
||||||
(struct_body)
|
(struct_body)
|
||||||
|
|
@ -14,5 +15,6 @@
|
||||||
(function_body)
|
(function_body)
|
||||||
(block_statement)
|
(block_statement)
|
||||||
(asm_function_body)
|
(asm_function_body)
|
||||||
(asm_list)
|
; <{ … }>
|
||||||
|
(asm_sequence)
|
||||||
] @fold
|
] @fold
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,10 @@
|
||||||
; --------
|
; --------
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
|
|
||||||
|
(destruct_bind
|
||||||
|
name: (identifier) @variable.member
|
||||||
|
bind: (identifier) @variable)
|
||||||
|
|
||||||
; variable.builtin
|
; variable.builtin
|
||||||
; ----------------
|
; ----------------
|
||||||
(self) @variable.builtin
|
(self) @variable.builtin
|
||||||
|
|
@ -51,15 +55,23 @@
|
||||||
"<"
|
"<"
|
||||||
"<="
|
"<="
|
||||||
"<<"
|
"<<"
|
||||||
|
"<<="
|
||||||
">"
|
">"
|
||||||
">="
|
">="
|
||||||
">>"
|
">>"
|
||||||
|
">>="
|
||||||
"&"
|
"&"
|
||||||
|
"&="
|
||||||
"|"
|
"|"
|
||||||
|
"|="
|
||||||
"^"
|
"^"
|
||||||
|
"^="
|
||||||
"&&"
|
"&&"
|
||||||
|
"&&="
|
||||||
"||"
|
"||"
|
||||||
|
"||="
|
||||||
"->"
|
"->"
|
||||||
|
".."
|
||||||
] @operator
|
] @operator
|
||||||
|
|
||||||
; constructor
|
; constructor
|
||||||
|
|
@ -70,6 +82,9 @@
|
||||||
(initOf
|
(initOf
|
||||||
name: (identifier) @constructor)
|
name: (identifier) @constructor)
|
||||||
|
|
||||||
|
(codeOf
|
||||||
|
name: (identifier) @constructor)
|
||||||
|
|
||||||
; type
|
; type
|
||||||
; ----
|
; ----
|
||||||
(type_identifier) @type
|
(type_identifier) @type
|
||||||
|
|
@ -79,6 +94,10 @@
|
||||||
((identifier) @type.builtin
|
((identifier) @type.builtin
|
||||||
(#any-of? @type.builtin "Context" "SendParameters" "StateInit" "StdAddress" "VarAddress"))
|
(#any-of? @type.builtin "Context" "SendParameters" "StateInit" "StdAddress" "VarAddress"))
|
||||||
|
|
||||||
|
(generic_parameter_list
|
||||||
|
"<" @punctuation.bracket
|
||||||
|
">" @punctuation.bracket)
|
||||||
|
|
||||||
(bounced_type
|
(bounced_type
|
||||||
"bounced" @type.builtin
|
"bounced" @type.builtin
|
||||||
"<" @punctuation.bracket
|
"<" @punctuation.bracket
|
||||||
|
|
@ -94,7 +113,7 @@
|
||||||
|
|
||||||
(tlb_serialization
|
(tlb_serialization
|
||||||
"as" @keyword
|
"as" @keyword
|
||||||
type: (identifier) @type.builtin)
|
type: (identifier) @type)
|
||||||
|
|
||||||
; string
|
; string
|
||||||
; ------
|
; ------
|
||||||
|
|
@ -107,7 +126,7 @@
|
||||||
; string.special.path
|
; string.special.path
|
||||||
; -------------------
|
; -------------------
|
||||||
(import
|
(import
|
||||||
library: (string) @string.special.path)
|
name: (string) @string.special.path)
|
||||||
|
|
||||||
; boolean
|
; boolean
|
||||||
; -------
|
; -------
|
||||||
|
|
@ -127,10 +146,10 @@
|
||||||
|
|
||||||
((identifier) @constant.builtin
|
((identifier) @constant.builtin
|
||||||
(#any-of? @constant.builtin
|
(#any-of? @constant.builtin
|
||||||
"SendBounceIfActionFail" "SendPayGasSeparately" "SendIgnoreErrors" "SendDestroyIfZero"
|
"SendDefaultMode" "SendBounceIfActionFail" "SendPayGasSeparately" "SendIgnoreErrors"
|
||||||
"SendRemainingValue" "SendRemainingBalance" "SendOnlyEstimateFee" "ReserveExact"
|
"SendDestroyIfZero" "SendRemainingValue" "SendRemainingBalance" "SendOnlyEstimateFee"
|
||||||
"ReserveAllExcept" "ReserveAtMost" "ReserveAddOriginalBalance" "ReserveInvertSign"
|
"ReserveExact" "ReserveAllExcept" "ReserveAtMost" "ReserveAddOriginalBalance"
|
||||||
"ReserveBounceIfActionFail"))
|
"ReserveInvertSign" "ReserveBounceIfActionFail"))
|
||||||
|
|
||||||
; property
|
; property
|
||||||
; --------
|
; --------
|
||||||
|
|
@ -181,6 +200,8 @@
|
||||||
; ----------------
|
; ----------------
|
||||||
"initOf" @keyword.operator
|
"initOf" @keyword.operator
|
||||||
|
|
||||||
|
"codeOf" @keyword.operator
|
||||||
|
|
||||||
; keyword.import
|
; keyword.import
|
||||||
; --------------
|
; --------------
|
||||||
"import" @keyword.import
|
"import" @keyword.import
|
||||||
|
|
@ -277,6 +298,35 @@
|
||||||
(method_call_expression
|
(method_call_expression
|
||||||
name: (identifier) @function.method.call)
|
name: (identifier) @function.method.call)
|
||||||
|
|
||||||
|
; asm-specific
|
||||||
|
; ------------
|
||||||
|
(tvm_instruction) @function.call
|
||||||
|
|
||||||
|
(asm_integer) @number
|
||||||
|
|
||||||
|
(asm_string) @string
|
||||||
|
|
||||||
|
(asm_control_register) @string.special.symbol
|
||||||
|
|
||||||
|
(asm_stack_register) @string.special.symbol
|
||||||
|
|
||||||
|
(asm_hex_bitstring) @function.macro
|
||||||
|
|
||||||
|
(asm_bin_bitstring) @function.macro
|
||||||
|
|
||||||
|
(asm_boc_hex) @function.macro
|
||||||
|
|
||||||
|
(asm_cont_name) @variable
|
||||||
|
|
||||||
|
; within asm_sequence
|
||||||
|
[
|
||||||
|
"<{"
|
||||||
|
"}>"
|
||||||
|
"}>c"
|
||||||
|
"}>s"
|
||||||
|
"}>CONT"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
||||||
; attribute
|
; attribute
|
||||||
; ---------
|
; ---------
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
(argument_list)
|
(argument_list)
|
||||||
; {..., ...}
|
; {..., ...}
|
||||||
(instance_argument_list)
|
(instance_argument_list)
|
||||||
|
(destruct_bind_list)
|
||||||
; {...; ...}
|
; {...; ...}
|
||||||
(message_body)
|
(message_body)
|
||||||
(struct_body)
|
(struct_body)
|
||||||
|
|
@ -14,7 +15,6 @@
|
||||||
(function_body)
|
(function_body)
|
||||||
(block_statement)
|
(block_statement)
|
||||||
(asm_function_body)
|
(asm_function_body)
|
||||||
(asm_list)
|
|
||||||
; misc.
|
; misc.
|
||||||
(binary_expression)
|
(binary_expression)
|
||||||
(ternary_expression)
|
(ternary_expression)
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@
|
||||||
|
|
||||||
; imports
|
; imports
|
||||||
(import
|
(import
|
||||||
(string) @local.definition.import)
|
name: (string) @local.definition.import)
|
||||||
|
|
||||||
; References @local.reference
|
; References @local.reference
|
||||||
; -----------------------------
|
; -----------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue