Debian Codegraph @

runtime/queries/matlab/highlights.scm

raw symbols SCIP
1 ; Constants
2
3 (events (identifier) @constant)
4 (attribute (identifier) @constant)
5
6 "~" @constant.builtin
7
8 ; Fields/Properties
9
10 (superclass "." (identifier) @variable.other.member)
11 (property_name "." (identifier) @variable.other.member)
12 (property name: (identifier) @variable.other.member)
13
14 ; Types
15
16 (class_definition name: (identifier) @keyword.storage.type)
17 (attributes (identifier) @constant)
18 (enum . (identifier) @type.enum.variant)
19
20 ; Functions
21
22 (function_definition
23 "function" @keyword.function
24 name: (identifier) @function
25 [ "end" "endfunction" ]? @keyword.function)
26
27 (function_signature name: (identifier) @function)
28 (function_call name: (identifier) @function)
29 (handle_operator (identifier) @function)
30 (validation_functions (identifier) @function)
31 (command (command_name) @function.macro)
32 (command_argument) @string
33 (return_statement) @keyword.control.return
34
35 ; Assignments
36
37 (assignment left: (_) @variable)
38 (multioutput_variable (_) @variable)
39
40 ; Parameters
41
42 (function_arguments (identifier) @variable.parameter)
43
44 ; Conditionals
45
46 (if_statement [ "if" "end" ] @keyword.control.conditional)
47 (elseif_clause "elseif" @keyword.control.conditional)
48 (else_clause "else" @keyword.control.conditional)
49 (switch_statement [ "switch" "end" ] @keyword.control.conditional)
50 (case_clause "case" @keyword.control.conditional)
51 (otherwise_clause "otherwise" @keyword.control.conditional)
52 (break_statement) @keyword.control.conditional
53
54 ; Repeats
55
56 (for_statement [ "for" "parfor" "end" ] @keyword.control.repeat)
57 (while_statement [ "while" "end" ] @keyword.control.repeat)
58 (continue_statement) @keyword.control.repeat
59
60 ; Exceptions
61
62 (try_statement [ "try" "end" ] @keyword.control.exception)
63 (catch_clause "catch" @keyword.control.exception)
64
65 ; Punctuation
66
67 [ ";" "," "." ] @punctuation.delimiter
68 [ "(" ")" "[" "]" "{" "}" ] @punctuation.bracket
69
70 ; Literals
71
72 (escape_sequence) @constant.character.escape
73 (formatting_sequence) @constant.character.escape
74 (string) @string
75 (number) @constant.numeric.float
76 (unary_operator ["+" "-"] @constant.numeric.float)
77
78 ; Comments
79
80 [ (comment) (line_continuation) ] @comment.line
81
82 ; Operators
83
84 [
85 "+"
86 ".+"
87 "-"
88 ".*"
89 "*"
90 ".*"
91 "/"
92 "./"
93 "\\"
94 ".\\"
95 "^"
96 ".^"
97 "'"
98 ".'"
99 "|"
100 "&"
101 "?"
102 "@"
103 "<"
104 "<="
105 ">"
106 ">="
107 "=="
108 "~="
109 "="
110 "&&"
111 "||"
112 ":"
113 ] @operator
114
115 ; Keywords
116
117 "classdef" @keyword.storage.type
118 [
119 "arguments"
120 "end"
121 "enumeration"
122 "events"
123 "global"
124 "methods"
125 "persistent"
126 "properties"
127 ] @keyword