diff --git a/runtime/queries/kos/highlights.scm b/runtime/queries/kos/highlights.scm index 3c2e20cd2..477245dfc 100644 --- a/runtime/queries/kos/highlights.scm +++ b/runtime/queries/kos/highlights.scm @@ -8,13 +8,12 @@ (property_identifier) @property -(string_literal) @string - -(string_literal_begin) @string - -(string_literal_continuation) @string - -(string_literal_end) @string +[ + (string_literal) + (string_literal_begin) + (string_literal_continuation) + (string_literal_end) +] @string [ "case" @@ -27,6 +26,8 @@ "import" @keyword.import [ + (break_statement) + (continue_statement) "for" "loop" "repeat" @@ -61,9 +62,7 @@ (line) "assert" ;"async" - (break_statement) "const" - (continue_statement) "do" "extends" (fallthrough_statement) diff --git a/tests/query/highlights/kos/test.kos b/tests/query/highlights/kos/test.kos index 202539cb5..768c9580e 100644 --- a/tests/query/highlights/kos/test.kos +++ b/tests/query/highlights/kos/test.kos @@ -99,5 +99,29 @@ fun name(arg1, # ^ number # ^ operator # ^ variable + for const elem in arg1 { + # ^ keyword.repeat + # ^ keyword + # ^ variable + # ^ keyword.repeat + # ^ variable + # ^ punctuation.bracket + if elem { + # ^ keyword.conditional + # ^ variable + # ^ punctuation.bracket + continue + # ^ keyword.repeat + } + # ^ punctuation.bracket + else { + # ^ keyword.conditional + # ^ punctuation.bracket + break + # ^ keyword.repeat + } + # ^ punctuation.bracket + } + # <- punctuation.bracket } # <- punctuation.bracket