Skip to content

Commit db956e4

Browse files
committed
updated solidity highlight.scm
1 parent 6ab900d commit db956e4

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

queries/solidity/highlights.scm

+18-20
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@
4040
(type_name "(" @punctuation.bracket "=>" @punctuation.delimiter ")" @punctuation.bracket)
4141

4242
; Definitions
43-
(struct_declaration
43+
(struct_declaration
4444
name: (identifier) @type)
45-
(enum_declaration
45+
(enum_declaration
4646
name: (identifier) @type)
4747
(contract_declaration
48-
name: (identifier) @type)
48+
name: (identifier) @type)
4949
(library_declaration
50-
name: (identifier) @type)
50+
name: (identifier) @type)
5151
(interface_declaration
5252
name: (identifier) @type)
53-
(event_definition
54-
name: (identifier) @type)
53+
(event_definition
54+
name: (identifier) @type)
5555

5656
(function_definition
5757
name: (identifier) @function)
@@ -68,26 +68,26 @@
6868
(struct_member name: (identifier) @property)
6969
(enum_value) @constant
7070

71-
; Invocations
72-
(emit_statement . (identifier) @type)
71+
; Invocations
72+
(emit_statement . (_) @type)
7373
(modifier_invocation (identifier) @function)
7474

75-
(call_expression . (member_expression property: (identifier) @function.method))
76-
(call_expression . (identifier) @function)
75+
(call_expression . (_(member_expression property: (_) @function.method)))
76+
(call_expression . (expression(identifier)) @function)
7777

7878
; Function parameters
79-
(call_struct_argument name: (identifier) @field)
80-
(event_parameter name: (identifier) @variable.parameter)
79+
(call_struct_argument name: (_) @field)
80+
(event_parameter name: (identifier) @parameter)
8181
(parameter name: (identifier) @variable.parameter)
8282

8383
; Yul functions
8484
(yul_function_call function: (yul_identifier) @function)
85-
(yul_function_definition . (yul_identifier) @function (yul_identifier) @variable.parameter)
85+
(yul_function_definition . (yul_identifier) @function (yul_identifier) @parameter)
8686

8787

8888
; Structs and members
8989
(member_expression property: (identifier) @property)
90-
(struct_expression type: ((identifier) @type .))
90+
(struct_expression type: ((expression(identifier)) @type .))
9191
(struct_field_assignment name: (identifier) @property)
9292

9393

@@ -146,7 +146,7 @@
146146
[
147147
"try"
148148
"catch"
149-
] @keyword.exception
149+
] @exception
150150

151151
[
152152
"return"
@@ -155,9 +155,9 @@
155155

156156
"function" @keyword.function
157157

158-
"import" @keyword.import
159-
(import_directive "as" @keyword.import)
160-
(import_directive "from" @keyword.import)
158+
"import" @include
159+
(import_directive "as" @include)
160+
(import_directive "from" @include)
161161

162162
(event_parameter "indexed" @keyword)
163163

@@ -185,7 +185,6 @@
185185
"&&"
186186
"||"
187187
">>"
188-
">>>"
189188
"<<"
190189
"&"
191190
"^"
@@ -200,7 +199,6 @@
200199
"<="
201200
"=="
202201
"!="
203-
"!=="
204202
">="
205203
">"
206204
"!"

0 commit comments

Comments
 (0)