-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use tree-sitter-c-sharp from crates.io
- Loading branch information
Showing
66 changed files
with
229 additions
and
1,588,921 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
;; https://github.com/tree-sitter/tree-sitter-c-sharp/blob/4bf615f8d688f50d69fc5677187dc35f22e03ad6/queries/highlights.scm | ||
;; MIT license | ||
(identifier) @variable | ||
|
||
;; Methods | ||
|
||
(method_declaration name: (identifier) @function) | ||
(local_function_statement name: (identifier) @function) | ||
|
||
;; Types | ||
|
||
(interface_declaration name: (identifier) @type) | ||
(class_declaration name: (identifier) @type) | ||
(enum_declaration name: (identifier) @type) | ||
(struct_declaration (identifier) @type) | ||
(record_declaration (identifier) @type) | ||
(namespace_declaration name: (identifier) @module) | ||
|
||
(generic_name (identifier) @type) | ||
(type_parameter (identifier) @property.definition) | ||
(parameter type: (identifier) @type) | ||
(type_argument_list (identifier) @type) | ||
(as_expression right: (identifier) @type) | ||
(is_expression right: (identifier) @type) | ||
|
||
(constructor_declaration name: (identifier) @constructor) | ||
(destructor_declaration name: (identifier) @constructor) | ||
|
||
(_ type: (identifier) @type) | ||
|
||
(base_list (identifier) @type) | ||
|
||
(predefined_type) @type.builtin | ||
|
||
;; Enum | ||
(enum_member_declaration (identifier) @property.definition) | ||
|
||
;; Literals | ||
|
||
[ | ||
(real_literal) | ||
(integer_literal) | ||
] @number | ||
|
||
[ | ||
(character_literal) | ||
(string_literal) | ||
(raw_string_literal) | ||
(verbatim_string_literal) | ||
(interpolated_string_expression) | ||
(interpolation_start) | ||
(interpolation_quote) | ||
] @string | ||
|
||
(escape_sequence) @string.escape | ||
|
||
[ | ||
(boolean_literal) | ||
(null_literal) | ||
] @constant.builtin | ||
|
||
;; Comments | ||
|
||
(comment) @comment | ||
|
||
;; Tokens | ||
|
||
[ | ||
";" | ||
"." | ||
"," | ||
] @punctuation.delimiter | ||
|
||
[ | ||
"--" | ||
"-" | ||
"-=" | ||
"&" | ||
"&=" | ||
"&&" | ||
"+" | ||
"++" | ||
"+=" | ||
"<" | ||
"<=" | ||
"<<" | ||
"<<=" | ||
"=" | ||
"==" | ||
"!" | ||
"!=" | ||
"=>" | ||
">" | ||
">=" | ||
">>" | ||
">>=" | ||
">>>" | ||
">>>=" | ||
"|" | ||
"|=" | ||
"||" | ||
"?" | ||
"??" | ||
"??=" | ||
"^" | ||
"^=" | ||
"~" | ||
"*" | ||
"*=" | ||
"/" | ||
"/=" | ||
"%" | ||
"%=" | ||
":" | ||
] @operator | ||
|
||
[ | ||
"(" | ||
")" | ||
"[" | ||
"]" | ||
"{" | ||
"}" | ||
(interpolation_brace) | ||
] @punctuation.bracket | ||
|
||
;; Keywords | ||
|
||
[ | ||
(modifier) | ||
"this" | ||
(implicit_type) | ||
] @keyword | ||
|
||
[ | ||
"add" | ||
"alias" | ||
"as" | ||
"base" | ||
"break" | ||
"case" | ||
"catch" | ||
"checked" | ||
"class" | ||
"continue" | ||
"default" | ||
"delegate" | ||
"do" | ||
"else" | ||
"enum" | ||
"event" | ||
"explicit" | ||
"extern" | ||
"finally" | ||
"for" | ||
"foreach" | ||
"global" | ||
"goto" | ||
"if" | ||
"implicit" | ||
"interface" | ||
"is" | ||
"lock" | ||
"namespace" | ||
"notnull" | ||
"operator" | ||
"params" | ||
"return" | ||
"remove" | ||
"sizeof" | ||
"stackalloc" | ||
"static" | ||
"struct" | ||
"switch" | ||
"throw" | ||
"try" | ||
"typeof" | ||
"unchecked" | ||
"using" | ||
"while" | ||
"new" | ||
"await" | ||
"in" | ||
"yield" | ||
"get" | ||
"set" | ||
"when" | ||
"out" | ||
"ref" | ||
"from" | ||
"where" | ||
"select" | ||
"record" | ||
"init" | ||
"with" | ||
"let" | ||
] @keyword | ||
|
||
;; Attribute | ||
|
||
(attribute name: (identifier) @attribute) | ||
|
||
;; Parameters | ||
|
||
(parameter | ||
name: (identifier) @variable.parameter) | ||
|
||
;; Type constraints | ||
|
||
(type_parameter_constraints_clause (identifier) @property.definition) | ||
|
||
;; Method calls | ||
|
||
(invocation_expression (member_access_expression name: (identifier) @function)) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
vendored_parsers/tree-sitter-c-sharp/.github/workflows/build.yml
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
vendored_parsers/tree-sitter-c-sharp/.github/workflows/publish_crate.yml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.