feat!: drop modules, general refactor and cleanup

This commit is contained in:
Christian Clason 2023-06-12 09:54:30 -06:00
parent c13e28f894
commit 2c8f2f2fad
829 changed files with 4905 additions and 8010 deletions

View file

@ -0,0 +1,18 @@
[
(preprocessor_macro_definition)
(preprocessor_macro_expansion)
(conditional_preprocessing)
(embedded_code)
(probe_point_definition)
(probe_point_alias_prologue)
(probe_point_alias_epilogue)
(variable_declaration)
(function_definition)
(if_statement)
(while_statement)
(for_statement)
(foreach_statement)
(try_statement)
(catch_clause)
(comment)
] @fold

View file

@ -0,0 +1,153 @@
(identifier) @variable
(preprocessor_macro_definition
name: (identifier) @function.macro)
(preprocessor_macro_expansion) @function.macro
(preprocessor_constant) @constant.macro
(number) @number
(string) @string
(escape_sequence) @string.escape
[
(script_argument_string)
(script_argument_number)
] @constant
(probe_point_component) @function
(function_definition
name: (identifier) @function)
(parameter
name: (identifier) @parameter)
(type) @type.builtin
(aggregation_operator) @attribute
(member_expression
member: (identifier) @field)
(call_expression
function: (identifier) @function.call)
((call_expression
function: (identifier) @function.builtin)
(#any-of? @function.builtin
"print" "printd" "printdln" "printf" "println"
"sprint" "sprintd" "sprintdln" "sprintf" "sprintln"))
((identifier) @variable.builtin
(#lua-match? @variable.builtin "^\$+[0-9A-Z_a-z]+\$*$"))
(shebang_line) @preproc
(comment) @comment @spell
[
"!"
"!="
"!~"
"$"
"$$"
"%"
"%="
"&"
"&&"
"&="
"*"
"*="
"+"
"++"
"+="
"-"
"--"
"-="
"->"
"."
".="
"/"
"/="
":"
"<"
"<<"
"<<<"
"<<="
"<="
"="
"=="
"=~"
">"
">="
">>"
">>="
"?"
"^"
"^="
"|"
"|="
"||"
"~"
] @operator
[
","
(null_statement)
] @punctuation.delimiter
[
"%{"
"%}"
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
[
"delete"
"limit"
"next"
"probe"
] @keyword
"function" @keyword.function
"in" @keyword.operator
"return" @keyword.return
[
"if"
"else"
] @conditional
[
"break"
"continue"
"for"
"foreach"
"while"
] @repeat
[
"try"
"catch"
] @exception
[
"%("
"%)"
"%:"
"%?"
(preprocessor_tokens)
(embedded_code)
] @preproc
"@define" @define
"private" @type.qualifier
"global" @storageclass

View file

@ -0,0 +1,5 @@
((comment) @injection.content
(#set! injection.language "comment"))
((embedded_code) @injection.content
(#set! injection.language "c"))

View file

@ -0,0 +1,35 @@
[
(function_definition)
(statement_block)
(if_statement)
(while_statement)
(for_statement)
(foreach_statement)
(catch_clause)
] @scope
(init_declarator
name: (identifier) @definition.var)
(array_declarator
name: (identifier) @definition.var)
(function_definition
name: (identifier) @definition.function)
(parameter
name: (identifier) @definition.parameter)
(tuple_capture
(identifier) @definition.var)
(catch_clause
parameter: (identifier) @definition.var)
(assignment_expression
left: (identifier) @definition.var)
(call_expression
function: (identifier) @reference)
(identifier) @reference