diff options
| author | Pham Huy Hoang <hoangtun0810@gmail.com> | 2024-01-06 15:05:50 +0900 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-01-19 16:58:37 +0100 |
| commit | 57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9 (patch) | |
| tree | 70bf645539882b88e6fa129cefd30986b89bbac3 /queries/nasm | |
| parent | ci: add query lint job (diff) | |
| download | nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.gz nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.bz2 nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.lz nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.xz nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.zst nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.zip | |
chore: query formatting
Diffstat (limited to 'queries/nasm')
| -rw-r--r-- | queries/nasm/highlights.scm | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/queries/nasm/highlights.scm b/queries/nasm/highlights.scm index d588635fc..02506de8b 100644 --- a/queries/nasm/highlights.scm +++ b/queries/nasm/highlights.scm @@ -1,8 +1,9 @@ -;; adapted from https://github.com/naclsn/tree-sitter-nasm/blob/main/queries/highlights.scm - +; adapted from https://github.com/naclsn/tree-sitter-nasm/blob/main/queries/highlights.scm (word) @variable + ((word) @constant (#lua-match? @constant "^[A-Z_][?A-Z_0-9]+$")) + ((word) @constant.builtin (#lua-match? @constant.builtin "^__%?[A-Z_a-z0-9]+%?__$")) @@ -11,19 +12,28 @@ (section_here_token) ] @variable.builtin -(label (word) @label) -(assembl_directive_symbols (word) @label) -(assembl_directive_sections (word) @label) +(label + (word) @label) + +(assembl_directive_symbols + (word) @label) + +(assembl_directive_sections + (word) @label) (unary_expression operator: _ @operator) + (binary_expression operator: _ @operator) "?" @constant.builtin (conditional_expression - [ "?" ":" ] @keyword.conditional.ternary) + [ + "?" + ":" + ] @keyword.conditional.ternary) [ ":" @@ -31,12 +41,16 @@ ] @punctuation.delimiter [ - "(" ")" - "[" "]" - "{" "}" + "(" + ")" + "[" + "]" + "{" + "}" ] @punctuation.bracket (instruction_prefix) @keyword + (actual_instruction instruction: (word) @function.builtin) @@ -44,13 +58,16 @@ base: (word) @function.call) (size_hint) @type + (struc_declaration name: (word) @type) + (struc_instance name: (word) @type) (effective_address hint: _ @type) + (effective_address segment: _ @constant.builtin) |
