Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/tact/highlights.scm')
-rw-r--r--runtime/queries/tact/highlights.scm216
1 files changed, 108 insertions, 108 deletions
diff --git a/runtime/queries/tact/highlights.scm b/runtime/queries/tact/highlights.scm
index 53bf985b..51b1ea9e 100644
--- a/runtime/queries/tact/highlights.scm
+++ b/runtime/queries/tact/highlights.scm
@@ -9,40 +9,90 @@
"@interface"
] @attribute
-; comment.line
-; ------------
+; operator
+; --------
-((comment) @comment.line
- (#match? @comment.line "^//"))
+[
+ "-" "-="
+ "+" "+="
+ "*" "*="
+ "/" "/="
+ "%" "%="
+ "=" "=="
+ "!" "!=" "!!"
+ "<" "<=" "<<"
+ ">" ">=" ">>"
+ "&" "|"
+ "&&" "||"
+] @operator
-; comment.block
-; -------------
+; punctuation.bracket
+; -------------------
-(comment) @comment.block
+[
+ "(" ")"
+ "{" "}"
+] @punctuation.bracket
-; function.builtin
+; punctuation.delimiter
+; ---------------------
+
+[
+ ";"
+ ","
+ "."
+ ":"
+ "?"
+] @punctuation.delimiter
+
+; variable
+; --------
+
+(identifier) @variable
+
+; variable.builtin
; ----------------
-((identifier) @function.builtin
- (#any-of? @function.builtin
- "send" "sender" "require" "now"
- "myBalance" "myAddress" "newAddress"
- "contractAddress" "contractAddressExt"
- "emit" "cell" "ton"
- "beginString" "beginComment" "beginTailString" "beginStringFromBuilder" "beginCell" "emptyCell"
- "randomInt" "random"
- "checkSignature" "checkDataSignature" "sha256"
- "min" "max" "abs" "pow"
- "throw" "dump" "getConfigParam"
- "nativeThrowWhen" "nativeThrowUnless" "nativeReserve"
- "nativeRandomize" "nativeRandomizeLt" "nativePrepareRandom" "nativeRandom" "nativeRandomInterval")
- (#is-not? local))
+(self) @variable.builtin
-; function.method
-; ---------------
+; variable.parameter
+; ------------------
-(method_call_expression
- name: (identifier) @function.method)
+(parameter
+ name: (identifier) @variable.parameter)
+
+; variable.other.member
+; ---------------------
+
+(field
+ name: (identifier) @variable.other.member)
+
+(contract_body
+ (constant
+ name: (identifier) @variable.other.member))
+
+(trait_body
+ (constant
+ name: (identifier) @variable.other.member))
+
+(field_access_expression
+ name: (identifier) @variable.other.member)
+
+(lvalue (_) (_) @variable.other.member)
+
+(instance_argument
+ name: (identifier) @variable.other.member)
+
+; comment.block
+; -------------
+
+(comment) @comment.block
+
+; comment.line
+; ------------
+
+((comment) @comment.line
+ (#match? @comment.line "^//"))
; function
; --------
@@ -73,6 +123,30 @@
(function
name: (identifier) @function.method)
+; function.method
+; ---------------
+
+(method_call_expression
+ name: (identifier) @function.method)
+
+; function.builtin
+; ----------------
+
+((identifier) @function.builtin
+ (#any-of? @function.builtin
+ "send" "sender" "require" "now"
+ "myBalance" "myAddress" "newAddress"
+ "contractAddress" "contractAddressExt"
+ "emit" "cell" "ton"
+ "beginString" "beginComment" "beginTailString" "beginStringFromBuilder" "beginCell" "emptyCell"
+ "randomInt" "random"
+ "checkSignature" "checkDataSignature" "sha256"
+ "min" "max" "abs" "pow"
+ "throw" "dump" "getConfigParam"
+ "nativeThrowWhen" "nativeThrowUnless" "nativeReserve"
+ "nativeRandomize" "nativeRandomizeLt" "nativePrepareRandom" "nativeRandom" "nativeRandomInterval")
+ (#is-not? local))
+
; keyword.control.conditional
; ---------------------------
@@ -169,16 +243,21 @@
(constant
name: (identifier) @constant)
+; string
+; ------
+
+(string) @string
+
; string.special.path
; -------------------
(import_statement
library: (string) @string.special.path)
-; string
-; ------
+; type
+; ----
-(string) @string
+(type_identifier) @type
; type.builtin
; ------------
@@ -209,11 +288,6 @@
(#eq? @type.builtin "SendParameters")
(#is-not? local))
-; type
-; ----
-
-(type_identifier) @type
-
; constructor
; -----------
@@ -222,77 +296,3 @@
(initOf
name: (identifier) @constructor)
-
-; operator
-; --------
-
-[
- "-" "-="
- "+" "+="
- "*" "*="
- "/" "/="
- "%" "%="
- "=" "=="
- "!" "!=" "!!"
- "<" "<=" "<<"
- ">" ">=" ">>"
- "&" "|"
- "&&" "||"
-] @operator
-
-; punctuation.bracket
-; -------------------
-
-[
- "(" ")"
- "{" "}"
-] @punctuation.bracket
-
-; punctuation.delimiter
-; ---------------------
-
-[
- ";"
- ","
- "."
- ":"
- "?"
-] @punctuation.delimiter
-
-; variable.other.member
-; ---------------------
-
-(field
- name: (identifier) @variable.other.member)
-
-(contract_body
- (constant
- name: (identifier) @variable.other.member))
-
-(trait_body
- (constant
- name: (identifier) @variable.other.member))
-
-(field_access_expression
- name: (identifier) @variable.other.member)
-
-(lvalue (_) (_) @variable.other.member)
-
-(instance_argument
- name: (identifier) @variable.other.member)
-
-; variable.parameter
-; ------------------
-
-(parameter
- name: (identifier) @variable.parameter)
-
-; variable.builtin
-; ----------------
-
-(self) @variable.builtin
-
-; variable
-; --------
-
-(identifier) @variable