From d9cf62e7e2921f3455d0b8bf542d8f5274ac050b Mon Sep 17 00:00:00 2001 From: "Valentin B." <703631+beeb@users.noreply.github.com> Date: Thu, 21 Nov 2024 10:12:19 +0100 Subject: [PATCH] chore(solidity): add highlight queries --- runtime/queries/solidity/highlights.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/runtime/queries/solidity/highlights.scm b/runtime/queries/solidity/highlights.scm index 73f354a25ad5..8b5dae4206fd 100644 --- a/runtime/queries/solidity/highlights.scm +++ b/runtime/queries/solidity/highlights.scm @@ -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) @@ -20,6 +22,7 @@ [ (true) (false) + (yul_boolean) ] @constant.builtin.boolean (comment) @comment @@ -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)