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 | ✓ | | | | | iex | ✓ | | | |
| ini | ✓ | | | | | ini | ✓ | | | |
| inko | ✓ | ✓ | ✓ | | | inko | ✓ | ✓ | ✓ | |
| ispc | ✓ | | | | | ispc | ✓ | | | |
| janet | ✓ | | | | | janet | ✓ | | | |
| java | ✓ | ✓ | ✓ | `jdtls` | | java | ✓ | ✓ | ✓ | `jdtls` |
| javascript | ✓ | ✓ | ✓ | `typescript-language-server` | | javascript | ✓ | ✓ | ✓ | `typescript-language-server` |

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

@ -1,144 +1,42 @@
[ ; inherits: c
"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
[ [
"do" "soa"
"for" "task"
"while" "launch"
"cdo" "unmasked"
"cfor" "template"
"cwhile" "typename"
"foreach" (sync_expression)
"foreach_tiled" ] @keyword
"foreach_active"
"foreach_unique"
] @repeat
[ [
"if" "in"
"cif" "new"
] @conditional "delete"
] @keyword.operator
[ [
"int8" "cdo"
"int16" "cfor"
"int32" "cwhile"
"int64" "foreach"
"uint8" "foreach_tiled"
"uint16" "foreach_active"
"uint32" "foreach_unique"
"uint64" ] @repeat
"float16"
"ptrdiff_t"
] @type.builtin
[ [
"const" "cif"
"volatile" ] @conditional
"varying"
"uniform"
] @type.qualifier
[ [
"export" "varying"
"extern" "uniform"
"inline" ] @type.qualifier
"noinline"
"static"
] @type.qualifier
"__vectorcall" @attribute
"__regcall" @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) (overload_declarator name: _ @function)
(foreach_statement range_operator: _ @operator) (foreach_statement range_operator: _ @operator)
@ -151,48 +49,48 @@
; built-in variables ; built-in variables
((identifier) @variable.builtin ((identifier) @variable.builtin
(#any-of? @variable.builtin (#any-of? @variable.builtin
"programCount" "programCount"
"programIndex" "programIndex"
"taskCount" "taskCount"
"taskCount0" "taskCount0"
"taskCount1" "taskCount1"
"taskCount2" "taskCount2"
"taskIndex" "taskIndex"
"taskIndex0" "taskIndex0"
"taskIndex1" "taskIndex1"
"taskIndex2" "taskIndex2"
"threadCount" "threadCount"
"threadIndex" "threadIndex"
)) ))
; preprocessor constants ; preprocessor constants
((identifier) @constant.builtin ((identifier) @constant.builtin
(#any-of? @constant.builtin (#any-of? @constant.builtin
"ISPC" "ISPC"
"ISPC_FP16_SUPPORTED" "ISPC_FP16_SUPPORTED"
"ISPC_FP64_SUPPORTED" "ISPC_FP64_SUPPORTED"
"ISPC_LLVM_INTRINSICS_ENABLED" "ISPC_LLVM_INTRINSICS_ENABLED"
"ISPC_MAJOR_VERSION" "ISPC_MAJOR_VERSION"
"ISPC_MINOR_VERSION" "ISPC_MINOR_VERSION"
"ISPC_POINTER_SIZE" "ISPC_POINTER_SIZE"
"ISPC_TARGET_AVX" "ISPC_TARGET_AVX"
"ISPC_TARGET_AVX2" "ISPC_TARGET_AVX2"
"ISPC_TARGET_AVX512KNL" "ISPC_TARGET_AVX512KNL"
"ISPC_TARGET_AVX512SKX" "ISPC_TARGET_AVX512SKX"
"ISPC_TARGET_AVX512SPR" "ISPC_TARGET_AVX512SPR"
"ISPC_TARGET_NEON" "ISPC_TARGET_NEON"
"ISPC_TARGET_SSE2" "ISPC_TARGET_SSE2"
"ISPC_TARGET_SSE4" "ISPC_TARGET_SSE4"
"ISPC_UINT_IS_DEFINED" "ISPC_UINT_IS_DEFINED"
"PI" "PI"
"TARGET_ELEMENT_WIDTH" "TARGET_ELEMENT_WIDTH"
"TARGET_WIDTH" "TARGET_WIDTH"
)) ))
; standard library built-in ; standard library built-in
((type_identifier) @type.builtin ((type_identifier) @type.builtin
(#lua-match? @type.builtin "^RNGState")) (#lua-match? @type.builtin "^RNGState"))
(call_expression (call_expression
function: (identifier) @function.builtin 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 ; inherits: c
(comment) @comment

@ -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