Skip to content

Commit

Permalink
chore(solidity): add highlight queries (#12102)
Browse files Browse the repository at this point in the history
Add highlights for `hex` and `unicode` string prefixes and YUL booleans
  • Loading branch information
beeb authored Nov 21, 2024
1 parent b8313da commit 9e0d2d0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions runtime/queries/solidity/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
(unicode_string_literal)
(yul_string_literal)
] @string
(hex_string_literal "hex" @string.special.symbol)
(unicode_string_literal "unicode" @string.special.symbol)
[
(number_literal)
(yul_decimal_number)
Expand All @@ -20,6 +22,7 @@
[
(true)
(false)
(yul_boolean)
] @constant.builtin.boolean

(comment) @comment
Expand All @@ -44,18 +47,18 @@
(type_name "(" @punctuation.bracket "=>" @punctuation.delimiter ")" @punctuation.bracket)

; Definitions
(struct_declaration
(struct_declaration
name: (identifier) @type)
(enum_declaration
(enum_declaration
name: (identifier) @type)
(contract_declaration
name: (identifier) @type)
name: (identifier) @type)
(library_declaration
name: (identifier) @type)
name: (identifier) @type)
(interface_declaration
name: (identifier) @type)
(event_definition
name: (identifier) @type)
(event_definition
name: (identifier) @type)

(function_definition
name: (identifier) @function)
Expand Down

0 comments on commit 9e0d2d0

Please sign in to comment.