| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
((identifier) @variable.other.member |
| 5 |
(#match? @variable.other.member "^m_.*$")) |
| 6 |
|
| 7 |
(parameter_declaration |
| 8 |
declarator: (reference_declarator) @variable.parameter) |
| 9 |
|
| 10 |
|
| 11 |
(variadic_parameter_declaration |
| 12 |
declarator: (variadic_declarator |
| 13 |
(_) @variable.parameter)) |
| 14 |
|
| 15 |
|
| 16 |
(optional_parameter_declaration |
| 17 |
declarator: (_) @variable.parameter) |
| 18 |
|
| 19 |
(field_declaration |
| 20 |
(field_identifier) @variable.other.member) |
| 21 |
|
| 22 |
(field_initializer |
| 23 |
(field_identifier) @variable.other.member) |
| 24 |
|
| 25 |
(function_declarator |
| 26 |
declarator: (field_identifier) @function.method) |
| 27 |
|
| 28 |
(concept_definition |
| 29 |
name: (identifier) @type) |
| 30 |
|
| 31 |
(alias_declaration |
| 32 |
name: (type_identifier) @type) |
| 33 |
|
| 34 |
(namespace_identifier) @namespace |
| 35 |
|
| 36 |
((namespace_identifier) @type |
| 37 |
(#match? @type "^[%u]")) |
| 38 |
|
| 39 |
(case_statement |
| 40 |
value: (qualified_identifier |
| 41 |
(identifier) @constant)) |
| 42 |
|
| 43 |
(using_declaration |
| 44 |
. |
| 45 |
"using" |
| 46 |
. |
| 47 |
"namespace" |
| 48 |
. |
| 49 |
[ |
| 50 |
(qualified_identifier) |
| 51 |
(identifier) |
| 52 |
] @namespace) |
| 53 |
|
| 54 |
(destructor_name |
| 55 |
(identifier) @function.method) |
| 56 |
|
| 57 |
|
| 58 |
(function_declarator |
| 59 |
(qualified_identifier |
| 60 |
(identifier) @function)) |
| 61 |
|
| 62 |
(function_declarator |
| 63 |
(qualified_identifier |
| 64 |
(qualified_identifier |
| 65 |
(identifier) @function))) |
| 66 |
|
| 67 |
(function_declarator |
| 68 |
(qualified_identifier |
| 69 |
(qualified_identifier |
| 70 |
(qualified_identifier |
| 71 |
(identifier) @function)))) |
| 72 |
|
| 73 |
(function_declarator |
| 74 |
(template_function |
| 75 |
(identifier) @function)) |
| 76 |
|
| 77 |
(operator_name) @function |
| 78 |
|
| 79 |
"operator" @function |
| 80 |
|
| 81 |
"static_assert" @function.builtin |
| 82 |
|
| 83 |
|
| 84 |
(call_expression |
| 85 |
(qualified_identifier |
| 86 |
(identifier) @function)) |
| 87 |
|
| 88 |
|
| 89 |
(call_expression |
| 90 |
(qualified_identifier |
| 91 |
(qualified_identifier |
| 92 |
(identifier) @function))) |
| 93 |
|
| 94 |
(call_expression |
| 95 |
(qualified_identifier |
| 96 |
(qualified_identifier |
| 97 |
(qualified_identifier |
| 98 |
(identifier) @function)))) |
| 99 |
|
| 100 |
(call_expression |
| 101 |
(template_function |
| 102 |
(identifier) @function)) |
| 103 |
|
| 104 |
(call_expression |
| 105 |
(qualified_identifier |
| 106 |
(template_function |
| 107 |
(identifier) @function))) |
| 108 |
|
| 109 |
(call_expression |
| 110 |
(qualified_identifier |
| 111 |
(qualified_identifier |
| 112 |
(template_function |
| 113 |
(identifier) @function)))) |
| 114 |
|
| 115 |
(call_expression |
| 116 |
(qualified_identifier |
| 117 |
(qualified_identifier |
| 118 |
(qualified_identifier |
| 119 |
(template_function |
| 120 |
(identifier) @function))))) |
| 121 |
|
| 122 |
|
| 123 |
(function_declarator |
| 124 |
(template_method |
| 125 |
(field_identifier) @function.method)) |
| 126 |
|
| 127 |
(call_expression |
| 128 |
(field_expression |
| 129 |
(field_identifier) @function.method)) |
| 130 |
|
| 131 |
|
| 132 |
((function_declarator |
| 133 |
(qualified_identifier |
| 134 |
(identifier) @constructor)) |
| 135 |
(#match? @constructor "^%u")) |
| 136 |
|
| 137 |
((call_expression |
| 138 |
function: (identifier) @constructor) |
| 139 |
(#match? @constructor "^%u")) |
| 140 |
|
| 141 |
((call_expression |
| 142 |
function: (qualified_identifier |
| 143 |
name: (identifier) @constructor)) |
| 144 |
(#match? @constructor "^%u")) |
| 145 |
|
| 146 |
((call_expression |
| 147 |
function: (field_expression |
| 148 |
field: (field_identifier) @constructor)) |
| 149 |
(#match? @constructor "^%u")) |
| 150 |
|
| 151 |
|
| 152 |
((field_initializer |
| 153 |
(field_identifier) @constructor |
| 154 |
(argument_list)) |
| 155 |
(#match? @constructor "^%u")) |
| 156 |
|
| 157 |
|
| 158 |
(this) @variable.builtin |
| 159 |
|
| 160 |
(null |
| 161 |
"nullptr" @constant.builtin) |
| 162 |
|
| 163 |
(true) @constant.builtin.boolean |
| 164 |
|
| 165 |
(false) @constant.builtin.boolean |
| 166 |
|
| 167 |
|
| 168 |
(raw_string_literal) @string |
| 169 |
|
| 170 |
|
| 171 |
[ |
| 172 |
"try" |
| 173 |
"catch" |
| 174 |
"noexcept" |
| 175 |
"throw" |
| 176 |
] @keyword.control.exception |
| 177 |
|
| 178 |
[ |
| 179 |
"decltype" |
| 180 |
"explicit" |
| 181 |
"friend" |
| 182 |
"override" |
| 183 |
"using" |
| 184 |
"requires" |
| 185 |
"constexpr" |
| 186 |
] @keyword |
| 187 |
|
| 188 |
[ |
| 189 |
"class" |
| 190 |
"namespace" |
| 191 |
"template" |
| 192 |
"typename" |
| 193 |
"concept" |
| 194 |
] @keyword.storage.type |
| 195 |
|
| 196 |
[ |
| 197 |
"co_await" |
| 198 |
"co_yield" |
| 199 |
"co_return" |
| 200 |
] @keyword |
| 201 |
|
| 202 |
[ |
| 203 |
"public" |
| 204 |
"private" |
| 205 |
"protected" |
| 206 |
"final" |
| 207 |
"virtual" |
| 208 |
] @keyword.storage.modifier |
| 209 |
|
| 210 |
[ |
| 211 |
"new" |
| 212 |
"delete" |
| 213 |
"xor" |
| 214 |
"bitand" |
| 215 |
"bitor" |
| 216 |
"compl" |
| 217 |
"not" |
| 218 |
"xor_eq" |
| 219 |
"and_eq" |
| 220 |
"or_eq" |
| 221 |
"not_eq" |
| 222 |
"and" |
| 223 |
"or" |
| 224 |
] @keyword.operator |
| 225 |
|
| 226 |
"<=>" @operator |
| 227 |
|
| 228 |
"::" @punctuation.delimiter |
| 229 |
|
| 230 |
(template_argument_list |
| 231 |
[ |
| 232 |
"<" |
| 233 |
">" |
| 234 |
] @punctuation.bracket) |
| 235 |
|
| 236 |
(template_parameter_list |
| 237 |
[ |
| 238 |
"<" |
| 239 |
">" |
| 240 |
] @punctuation.bracket) |
| 241 |
|
| 242 |
(literal_suffix) @operator |
| 243 |
|
| 244 |
|
| 245 |
[ |
| 246 |
"in" |
| 247 |
"out" |
| 248 |
"inout" |
| 249 |
"uniform" |
| 250 |
"shared" |
| 251 |
"groupshared" |
| 252 |
"discard" |
| 253 |
"cbuffer" |
| 254 |
"row_major" |
| 255 |
"column_major" |
| 256 |
"globallycoherent" |
| 257 |
"centroid" |
| 258 |
"noperspective" |
| 259 |
"nointerpolation" |
| 260 |
"sample" |
| 261 |
"linear" |
| 262 |
"snorm" |
| 263 |
"unorm" |
| 264 |
"point" |
| 265 |
"line" |
| 266 |
"triangleadj" |
| 267 |
"lineadj" |
| 268 |
"triangle" |
| 269 |
] @keyword |
| 270 |
|
| 271 |
((identifier) @variable.builtin |
| 272 |
(#match? @variable.builtin "^SV_")) |
| 273 |
|
| 274 |
|
| 275 |
(hlsl_attribute) @attribute |
| 276 |
|
| 277 |
(hlsl_attribute |
| 278 |
[ |
| 279 |
"[" |
| 280 |
"]" |
| 281 |
] @attribute) |
| 282 |
|
| 283 |
"This" @type.builtin |
| 284 |
|
| 285 |
[ |
| 286 |
"interface" |
| 287 |
"extension" |
| 288 |
"property" |
| 289 |
"associatedtype" |
| 290 |
"where" |
| 291 |
"var" |
| 292 |
"let" |
| 293 |
] @keyword |
| 294 |
|
| 295 |
"__init" @constructor |
| 296 |
|
| 297 |
[ |
| 298 |
"__subscript" |
| 299 |
"get" |
| 300 |
"set" |
| 301 |
] @function.builtin |
| 302 |
|
| 303 |
(call_expression) @function |
| 304 |
|
| 305 |
(call_expression (identifier)) @function |
| 306 |
|
| 307 |
((call_expression |
| 308 |
function: (identifier) @function.builtin) |
| 309 |
(#any-of? @function.builtin |
| 310 |
"frac" "abs" "acos" "acosh" "asin" "asinh" "atan" "atanh" "cos" "cosh" "exp" "exp2" "floor" "log" "log10" "log2" "round" "rsqrt" "sin" "sincos" "sinh" "sqrt" "tan" "tanh" "trunc" |
| 311 |
"AllMemoryBarrier" "AllMemoryBarrierWithGroupSync" "DeviceMemoryBarrier" "DeviceMemoryBarrierWithGroupSync" "GroupMemoryBarrier" "GroupMemoryBarrierWithGroupSync" |
| 312 |
"abort" "clip" "errorf" "printf" |
| 313 |
"all" "any" "countbits" "faceforward" "firstbithigh" "firstbitlow" "isfinite" "isinf" "isnan" "max" "min" "noise" "pow" "reversebits" "sign" |
| 314 |
"asdouble" "asfloat" "asint" "asuint" "D3DCOLORtoUBYTE4" "f16tof32" "f32tof16" |
| 315 |
"ceil" "clamp" "degrees" "fma" "fmod" "frac" "frexp" "ldexp" "lerp" "mad" "modf" "radiants" "saturate" "smoothstep" "step" |
| 316 |
"cross" "determinant" "distance" "dot" "dst" "length" "lit" "msad4" "mul" "normalize" "rcp" "reflect" "refract" "transpose" |
| 317 |
"ddx" "ddx_coarse" "ddx_fine" "ddy" "ddy_coarse" "ddy_fine" "fwidth" |
| 318 |
"EvaluateAttributeAtCentroid" "EvaluateAttributeAtSample" "EvaluateAttributeSnapped" |
| 319 |
"GetRenderTargetSampleCount" "GetRenderTargetSamplePosition" |
| 320 |
"InterlockedAdd" "InterlockedAnd" "InterlockedCompareExchange" "InterlockedCompareStore" "InterlockedExchange" "InterlockedMax" "InterlockedMin" "InterlockedOr" "InterlockedXor" |
| 321 |
"InterlockedCompareStoreFloatBitwise" "InterlockedCompareExchangeFloatBitwise" |
| 322 |
"Process2DQuadTessFactorsAvg" "Process2DQuadTessFactorsMax" "Process2DQuadTessFactorsMin" "ProcessIsolineTessFactors" |
| 323 |
"ProcessQuadTessFactorsAvg" "ProcessQuadTessFactorsMax" "ProcessQuadTessFactorsMin" "ProcessTriTessFactorsAvg" "ProcessTriTessFactorsMax" "ProcessTriTessFactorsMin" |
| 324 |
"tex1D" "tex1Dbias" "tex1Dgrad" "tex1Dlod" "tex1Dproj" |
| 325 |
"tex2D" "tex2Dbias" "tex2Dgrad" "tex2Dlod" "tex2Dproj" |
| 326 |
"tex3D" "tex3Dbias" "tex3Dgrad" "tex3Dlod" "tex3Dproj" |
| 327 |
"texCUBE" "texCUBEbias" "texCUBEgrad" "texCUBElod" "texCUBEproj" |
| 328 |
"WaveIsFirstLane" "WaveGetLaneCount" "WaveGetLaneIndex" |
| 329 |
"IsHelperLane" |
| 330 |
"WaveActiveAnyTrue" "WaveActiveAllTrue" "WaveActiveBallot" |
| 331 |
"WaveReadLaneFirst" "WaveReadLaneAt" |
| 332 |
"WaveActiveAllEqual" "WaveActiveAllEqualBool" "WaveActiveCountBits" |
| 333 |
"WaveActiveSum" "WaveActiveProduct" "WaveActiveBitAnd" "WaveActiveBitOr" "WaveActiveBitXor" "WaveActiveMin" "WaveActiveMax" |
| 334 |
"WavePrefixCountBits" "WavePrefixProduct" "WavePrefixSum" |
| 335 |
"QuadReadAcrossX" "QuadReadAcrossY" "QuadReadAcrossDiagonal" "QuadReadLaneAt" |
| 336 |
"QuadAny" "QuadAll" |
| 337 |
"WaveMatch" "WaveMultiPrefixSum" "WaveMultiPrefixProduct" "WaveMultiPrefixCountBits" "WaveMultiPrefixAnd" "WaveMultiPrefixOr" "WaveMultiPrefixXor" |
| 338 |
"NonUniformResourceIndex" |
| 339 |
"DispatchMesh" "SetMeshOutputCounts" |
| 340 |
"dot4add_u8packed" "dot4add_i8packed" "dot2add" |
| 341 |
"RestartStrip" |
| 342 |
"CalculateLevelOfDetail" "CalculateLevelOfDetailUnclamped" "Gather" "GetDimensions" "GetSamplePosition" "Load" "Sample" "SampleBias" "SampleCmp" "SampleCmpLevelZero" "SampleGrad" "SampleLevel" "GatherRaw" "SampleCmpLevel" |
| 343 |
"SampleCmpBias" "SampleCmpGrad" |
| 344 |
"WriteSamplerFeedback" "WriteSamplerFeedbackBias" "WriteSamplerFeedbackGrad" "WriteSamplerFeedbackLevel" |
| 345 |
"Append" "Consume" "DecrementCounter" "IncrementCounter" |
| 346 |
"Load2" "Load3" "Load4" "Store" "Store2" "Store3" "Store4" |
| 347 |
"GatherRed" "GatherGreen" "GatherBlue" "GatherAlpha" "GatherCmp" "GatherCmpRed" "GatherCmpGreen" "GatherCmpBlue" "GatherCmpAlpha" |
| 348 |
)) |
| 349 |
|
| 350 |
(interface_requirements |
| 351 |
(identifier) @type) |
| 352 |
|
| 353 |
(binary_expression |
| 354 |
[ |
| 355 |
"is" |
| 356 |
"as" |
| 357 |
] |
| 358 |
right: (identifier) @type) |
| 359 |
|
| 360 |
[ |
| 361 |
"as" |
| 362 |
"is" |
| 363 |
] @keyword.operator |
| 364 |
|
| 365 |
[ |
| 366 |
"__exported" |
| 367 |
"import" |
| 368 |
] @keyword.control.import |
| 369 |
|
| 370 |
(property_declaration |
| 371 |
(identifier) @variable.other.member) |