highlight(matlab): Fix string's single-quote's color (#7493)

This commit is contained in:
Álan Crístoffer 2023-07-01 00:39:17 +02:00 committed by GitHub
parent aec1b997dd
commit a9849ebee4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,6 +41,45 @@
(function_arguments (identifier) @variable.parameter) (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 ; Operators
[ [
@ -74,44 +113,6 @@
":" ":"
] @operator ] @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 ; Keywords
"classdef" @keyword.storage.type "classdef" @keyword.storage.type