From a9849ebee41a8cb884a9351d36ebd399adb4111e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lan=20Cr=C3=ADstoffer?= Date: Sat, 1 Jul 2023 00:39:17 +0200 Subject: [PATCH] highlight(matlab): Fix string's single-quote's color (#7493) --- runtime/queries/matlab/highlights.scm | 77 ++++++++++++++------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/runtime/queries/matlab/highlights.scm b/runtime/queries/matlab/highlights.scm index bc4c5069..875cba50 100644 --- a/runtime/queries/matlab/highlights.scm +++ b/runtime/queries/matlab/highlights.scm @@ -41,6 +41,45 @@ (function_arguments (identifier) @variable.parameter) +; Conditionals + +(if_statement [ "if" "end" ] @keyword.control.conditional) +(elseif_clause "elseif" @keyword.control.conditional) +(else_clause "else" @keyword.control.conditional) +(switch_statement [ "switch" "end" ] @keyword.control.conditional) +(case_clause "case" @keyword.control.conditional) +(otherwise_clause "otherwise" @keyword.control.conditional) +(break_statement) @keyword.control.conditional + +; Repeats + +(for_statement [ "for" "parfor" "end" ] @keyword.control.repeat) +(while_statement [ "while" "end" ] @keyword.control.repeat) +(continue_statement) @keyword.control.repeat + +; Exceptions + +(try_statement [ "try" "end" ] @keyword.control.exception) +(catch_clause "catch" @keyword.control.exception) + +; Punctuation + +[ ";" "," "." ] @punctuation.delimiter +[ "(" ")" "[" "]" "{" "}" ] @punctuation.bracket + +; Literals + +(escape_sequence) @constant.character.escape +(formatting_sequence) @constant.character.escape +(string) @string +(number) @constant.numeric.float +(unary_operator ["+" "-"] @constant.numeric.float) +(boolean) @constant.builtin.boolean + +; Comments + +[ (comment) (line_continuation) ] @comment.line + ; Operators [ @@ -74,44 +113,6 @@ ":" ] @operator -; Conditionals - -(if_statement [ "if" "end" ] @keyword.control.conditional) -(elseif_clause "elseif" @keyword.control.conditional) -(else_clause "else" @keyword.control.conditional) -(switch_statement [ "switch" "end" ] @keyword.control.conditional) -(case_clause "case" @keyword.control.conditional) -(otherwise_clause "otherwise" @keyword.control.conditional) -(break_statement) @keyword.control.conditional - -; Repeats - -(for_statement [ "for" "parfor" "end" ] @keyword.control.repeat) -(while_statement [ "while" "end" ] @keyword.control.repeat) -(continue_statement) @keyword.control.repeat - -; Exceptions - -(try_statement [ "try" "end" ] @keyword.control.exception) -(catch_clause "catch" @keyword.control.exception) - -; Punctuation - -[ ";" "," "." ] @punctuation.delimiter -[ "(" ")" "[" "]" "{" "}" ] @punctuation.bracket - -; Literals - -(escape_sequence) @constant.character.escape -(formatting_sequence) @constant.character.escape -(string) @string -(number) @constant.numeric.float -(boolean) @constant.builtin.boolean - -; Comments - -[ (comment) (line_continuation) ] @comment.line - ; Keywords "classdef" @keyword.storage.type