fix(ts): remove unused files
This commit is contained in:
@@ -1,99 +0,0 @@
|
||||
[
|
||||
(compound_statement)
|
||||
(field_declaration_list)
|
||||
(case_statement)
|
||||
(enumerator_list)
|
||||
(compound_literal_expression)
|
||||
(initializer_list)
|
||||
(init_declarator)
|
||||
] @indent.begin
|
||||
|
||||
; With current indent logic, if we capture expression_statement with @indent.begin
|
||||
; It will be affected by _parent_ node with error subnodes deep down the tree
|
||||
; So narrow indent capture to check for error inside expression statement only,
|
||||
(expression_statement
|
||||
(_) @indent.begin
|
||||
";" @indent.end)
|
||||
|
||||
(ERROR
|
||||
"for"
|
||||
"(" @indent.begin
|
||||
";"
|
||||
";"
|
||||
")" @indent.end)
|
||||
|
||||
((for_statement
|
||||
body: (_) @_body) @indent.begin
|
||||
(#not-kind-eq? @_body "compound_statement"))
|
||||
|
||||
(while_statement
|
||||
condition: (_) @indent.begin)
|
||||
|
||||
((while_statement
|
||||
body: (_) @_body) @indent.begin
|
||||
(#not-kind-eq? @_body "compound_statement"))
|
||||
|
||||
((if_statement)
|
||||
.
|
||||
(ERROR
|
||||
"else" @indent.begin))
|
||||
|
||||
(if_statement
|
||||
condition: (_) @indent.begin)
|
||||
|
||||
; Supports if without braces (but not both if-else without braces)
|
||||
(if_statement
|
||||
consequence: (_
|
||||
";" @indent.end) @_consequence
|
||||
(#not-kind-eq? @_consequence "compound_statement")
|
||||
alternative: (else_clause
|
||||
"else" @indent.branch
|
||||
[
|
||||
(if_statement
|
||||
(compound_statement) @indent.dedent)? @indent.dedent
|
||||
(compound_statement)? @indent.dedent
|
||||
(_)? @indent.dedent
|
||||
])?) @indent.begin
|
||||
|
||||
(else_clause
|
||||
(_
|
||||
.
|
||||
"{" @indent.branch))
|
||||
|
||||
(compound_statement
|
||||
"}" @indent.end)
|
||||
|
||||
[
|
||||
")"
|
||||
"}"
|
||||
(statement_identifier)
|
||||
] @indent.branch
|
||||
|
||||
[
|
||||
"#define"
|
||||
"#ifdef"
|
||||
"#ifndef"
|
||||
"#elif"
|
||||
"#if"
|
||||
"#else"
|
||||
"#endif"
|
||||
] @indent.zero
|
||||
|
||||
[
|
||||
(preproc_arg)
|
||||
(string_literal)
|
||||
] @indent.ignore
|
||||
|
||||
((ERROR
|
||||
(parameter_declaration)) @indent.align
|
||||
(#set! indent.open_delimiter "(")
|
||||
(#set! indent.close_delimiter ")"))
|
||||
|
||||
([
|
||||
(argument_list)
|
||||
(parameter_list)
|
||||
] @indent.align
|
||||
(#set! indent.open_delimiter "(")
|
||||
(#set! indent.close_delimiter ")"))
|
||||
|
||||
(comment) @indent.auto
|
||||
@@ -1,67 +0,0 @@
|
||||
; Functions definitions
|
||||
(function_declarator
|
||||
declarator: (identifier) @local.definition.function)
|
||||
|
||||
(preproc_function_def
|
||||
name: (identifier) @local.definition.macro) @local.scope
|
||||
|
||||
(preproc_def
|
||||
name: (identifier) @local.definition.macro)
|
||||
|
||||
(pointer_declarator
|
||||
declarator: (identifier) @local.definition.var)
|
||||
|
||||
(parameter_declaration
|
||||
declarator: (identifier) @local.definition.parameter)
|
||||
|
||||
(init_declarator
|
||||
declarator: (identifier) @local.definition.var)
|
||||
|
||||
(array_declarator
|
||||
declarator: (identifier) @local.definition.var)
|
||||
|
||||
(declaration
|
||||
declarator: (identifier) @local.definition.var)
|
||||
|
||||
(enum_specifier
|
||||
name: (_) @local.definition.type
|
||||
(enumerator_list
|
||||
(enumerator
|
||||
name: (identifier) @local.definition.var)))
|
||||
|
||||
; Type / Struct / Enum
|
||||
(field_declaration
|
||||
declarator: (field_identifier) @local.definition.field)
|
||||
|
||||
(type_definition
|
||||
declarator: (type_identifier) @local.definition.type)
|
||||
|
||||
(struct_specifier
|
||||
name: (type_identifier) @local.definition.type)
|
||||
|
||||
; goto
|
||||
(labeled_statement
|
||||
(statement_identifier) @local.definition)
|
||||
|
||||
; References
|
||||
(identifier) @local.reference
|
||||
|
||||
((field_identifier) @local.reference
|
||||
(#set! reference.kind "field"))
|
||||
|
||||
((type_identifier) @local.reference
|
||||
(#set! reference.kind "type"))
|
||||
|
||||
(goto_statement
|
||||
(statement_identifier) @local.reference)
|
||||
|
||||
; Scope
|
||||
[
|
||||
(for_statement)
|
||||
(if_statement)
|
||||
(while_statement)
|
||||
(translation_unit)
|
||||
(function_definition)
|
||||
(compound_statement) ; a block in curly braces
|
||||
(struct_specifier)
|
||||
] @local.scope
|
||||
Reference in New Issue
Block a user