Import ISPC queries from 7da3cb6323/queries/ispc instead

These seem to have been removed from the main repo in:
0197076648
pull/8678/head
Marijn Suijten 1 year ago
parent 0477b8b962
commit b352f180ab
No known key found for this signature in database
GPG Key ID: 23E7CB3F180C39F2

@ -93,7 +93,7 @@
| iex | ✓ | | | |
| ini | ✓ | | | |
| inko | ✓ | ✓ | ✓ | |
| ispc | ✓ | | | |
| ispc | ✓ | | | |
| janet | ✓ | | | |
| java | ✓ | ✓ | ✓ | `jdtls` |
| javascript | ✓ | ✓ | ✓ | `typescript-language-server` |

@ -0,0 +1,8 @@
; inherits: c
[
(foreach_statement)
(foreach_instance_statement)
(unmasked_statement)
(template_declaration)
] @fold

@ -1,144 +1,42 @@
[
"break"
"case"
"continue"
"default"
"else"
"enum"
"return"
"sizeof"
"struct"
"switch"
"typedef"
"union"
"soa"
"task"
"launch"
"unmasked"
"template"
"typename"
(sync_expression)
] @keyword
[
"in"
"new"
"delete"
] @keyword.operator
; inherits: c
[
"do"
"for"
"while"
"cdo"
"cfor"
"cwhile"
"foreach"
"foreach_tiled"
"foreach_active"
"foreach_unique"
] @repeat
"soa"
"task"
"launch"
"unmasked"
"template"
"typename"
(sync_expression)
] @keyword
[
"if"
"cif"
] @conditional
"in"
"new"
"delete"
] @keyword.operator
[
"int8"
"int16"
"int32"
"int64"
"uint8"
"uint16"
"uint32"
"uint64"
"float16"
"ptrdiff_t"
] @type.builtin
"cdo"
"cfor"
"cwhile"
"foreach"
"foreach_tiled"
"foreach_active"
"foreach_unique"
] @repeat
[
"const"
"volatile"
"varying"
"uniform"
] @type.qualifier
"cif"
] @conditional
[
"export"
"extern"
"inline"
"noinline"
"static"
] @type.qualifier
"varying"
"uniform"
] @type.qualifier
"__vectorcall" @attribute
"__regcall" @attribute
[
"#define"
"#elif"
"#else"
"#endif"
"#if"
"#ifdef"
"#ifndef"
"#include"
(preproc_directive)
] @preproc
[
"--"
"-"
"-="
"->"
"="
"!="
"*"
"&"
"&&"
"+"
"++"
"+="
"<"
"=="
">"
"||"
] @operator
"." @delimiter
";" @delimiter
(string_literal) @string
(system_lib_string) @string
(null) @constant
(number_literal) @number
(char_literal) @number
(call_expression
function: (identifier) @function)
(call_expression
function: (field_expression
field: (field_identifier) @function))
(function_declarator
declarator: (identifier) @function)
(preproc_function_def
name: (identifier) @function.special)
(field_identifier) @property
(statement_identifier) @label
(type_identifier) @type
(primitive_type) @type
(sized_type_specifier) @type
((identifier) @constant
(#match? @constant "^[A-Z][A-Z\\d_]*$"))
(identifier) @variable
(comment) @comment
(overload_declarator name: _ @function)
(foreach_statement range_operator: _ @operator)
@ -151,48 +49,48 @@
; built-in variables
((identifier) @variable.builtin
(#any-of? @variable.builtin
"programCount"
"programIndex"
"taskCount"
"taskCount0"
"taskCount1"
"taskCount2"
"taskIndex"
"taskIndex0"
"taskIndex1"
"taskIndex2"
"threadCount"
"threadIndex"
))
(#any-of? @variable.builtin
"programCount"
"programIndex"
"taskCount"
"taskCount0"
"taskCount1"
"taskCount2"
"taskIndex"
"taskIndex0"
"taskIndex1"
"taskIndex2"
"threadCount"
"threadIndex"
))
; preprocessor constants
((identifier) @constant.builtin
(#any-of? @constant.builtin
"ISPC"
"ISPC_FP16_SUPPORTED"
"ISPC_FP64_SUPPORTED"
"ISPC_LLVM_INTRINSICS_ENABLED"
"ISPC_MAJOR_VERSION"
"ISPC_MINOR_VERSION"
"ISPC_POINTER_SIZE"
"ISPC_TARGET_AVX"
"ISPC_TARGET_AVX2"
"ISPC_TARGET_AVX512KNL"
"ISPC_TARGET_AVX512SKX"
"ISPC_TARGET_AVX512SPR"
"ISPC_TARGET_NEON"
"ISPC_TARGET_SSE2"
"ISPC_TARGET_SSE4"
"ISPC_UINT_IS_DEFINED"
"PI"
"TARGET_ELEMENT_WIDTH"
"TARGET_WIDTH"
))
(#any-of? @constant.builtin
"ISPC"
"ISPC_FP16_SUPPORTED"
"ISPC_FP64_SUPPORTED"
"ISPC_LLVM_INTRINSICS_ENABLED"
"ISPC_MAJOR_VERSION"
"ISPC_MINOR_VERSION"
"ISPC_POINTER_SIZE"
"ISPC_TARGET_AVX"
"ISPC_TARGET_AVX2"
"ISPC_TARGET_AVX512KNL"
"ISPC_TARGET_AVX512SKX"
"ISPC_TARGET_AVX512SPR"
"ISPC_TARGET_NEON"
"ISPC_TARGET_SSE2"
"ISPC_TARGET_SSE4"
"ISPC_UINT_IS_DEFINED"
"PI"
"TARGET_ELEMENT_WIDTH"
"TARGET_WIDTH"
))
; standard library built-in
((type_identifier) @type.builtin
(#lua-match? @type.builtin "^RNGState"))
(#lua-match? @type.builtin "^RNGState"))
(call_expression
function: (identifier) @function.builtin

@ -0,0 +1,7 @@
; inherits: c
((foreach_statement body: (_) @_body) @indent.begin
(#not-has-type? @_body compound_statement))
((foreach_instance_statement body: (_) @_body) @indent.begin
(#not-has-type? @_body compound_statement))

@ -1,3 +1 @@
(preproc_arg) @c
(comment) @comment
; inherits: c

@ -0,0 +1,17 @@
; inherits: c
(reference_declarator
(identifier) @definition.var)
(type_parameter_declaration
(type_identifier) @definition.type)
(template_declaration) @scope
(template_function
name: (identifier) @definition.function) @scope
[
(foreach_statement)
(foreach_instance_statement)
(unmasked_statement)
] @scope
Loading…
Cancel
Save