Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/hare/highlights.scm')
| -rw-r--r-- | runtime/queries/hare/highlights.scm | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/runtime/queries/hare/highlights.scm b/runtime/queries/hare/highlights.scm index adaea14e..cd3c1d0a 100644 --- a/runtime/queries/hare/highlights.scm +++ b/runtime/queries/hare/highlights.scm @@ -1,5 +1,22 @@ -(type) @type -(type "const" @type) +[ + "f32" + "f64" + "i16" + "i32" + "i64" + "i8" + "int" + "rune" + "str" + "u16" + "u32" + "u64" + "u8" + "uint" + "uintptr" + "void" +] @type + [ "else" @@ -26,16 +43,18 @@ "assert" ] @keyword.control.exception -"fn" @keyword.function +[ + "def" + "fn" +] @keyword.function [ "alloc" "append" "as" "bool" - "case" + "char" "const" - "def" "defer" "delete" "enum" @@ -46,14 +65,13 @@ "match" "nullable" "offset" + "size" + "static" "struct" "type" "union" - "yield" ] @keyword -"static" @keyword.storage.modifier - [ "." "!" @@ -116,19 +134,15 @@ "null" "true" ] @constant.builtin -(literal "void") @constant.builtin - -(identifier) @variable -(string_literal) @string +(string_constant) @string (escape_sequence) @constant.character.escape -(rune_literal) @string -(integer_literal) @constant.numeric.integer -(floating_literal) @constant.numeric.float +(rune_constant) @string +(integer_constant) @constant.numeric.integer +(floating_constant) @constant.numeric.float (call_expression (postfix_expression) @function) -(size_expression "size" @function.builtin) (function_declaration name: (identifier) @function) @@ -140,4 +154,5 @@ (decl_attr) @special (fndec_attrs) @special -(struct_union_field (name)) @variable +(identifier) @variable + |