mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 03:10:04 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
c13e28f894
commit
2c8f2f2fad
829 changed files with 4905 additions and 8010 deletions
|
|
@ -1,36 +0,0 @@
|
|||
([
|
||||
(line_comment)
|
||||
(multiline_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
; There are 3 ways to define a regex
|
||||
; - "[abc]?".toRegex()
|
||||
(call_expression
|
||||
(navigation_expression
|
||||
((string_literal) @injection.content (#set! injection.language "regex"))
|
||||
(navigation_suffix
|
||||
((simple_identifier) @_function
|
||||
(#eq? @_function "toRegex")))))
|
||||
|
||||
; - Regex("[abc]?")
|
||||
(call_expression
|
||||
((simple_identifier) @_function
|
||||
(#eq? @_function "Regex"))
|
||||
(call_suffix
|
||||
(value_arguments
|
||||
(value_argument
|
||||
(string_literal) @injection.content (#set! injection.language "regex")))))
|
||||
|
||||
; - Regex.fromLiteral("[abc]?")
|
||||
(call_expression
|
||||
(navigation_expression
|
||||
((simple_identifier) @_class
|
||||
(#eq? @_class "Regex"))
|
||||
(navigation_suffix
|
||||
((simple_identifier) @_function
|
||||
(#eq? @_function "fromLiteral"))))
|
||||
(call_suffix
|
||||
(value_arguments
|
||||
(value_argument
|
||||
(string_literal) @injection.content (#set! injection.language "regex")))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue