mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
julia: update queries to parser change (#3956)
This commit is contained in:
parent
bfb875673e
commit
d31c71c959
4 changed files with 22 additions and 21 deletions
|
|
@ -201,7 +201,7 @@
|
|||
"revision": "768a384989391237c6d55ff3d878a0d1e0d2b4fa"
|
||||
},
|
||||
"julia": {
|
||||
"revision": "91ba1c3c9b50f388d4b67518c04bc9a003ed3475"
|
||||
"revision": "36b099e9ea577f64ba53323115028dadd2991d2c"
|
||||
},
|
||||
"kotlin": {
|
||||
"revision": "b953dbdd05257fcb2b64bc4d9c1578fac12e3c28"
|
||||
|
|
|
|||
|
|
@ -15,17 +15,9 @@
|
|||
|
||||
(quote_expression ":" (identifier)) @symbol
|
||||
|
||||
|
||||
;;; Fields and indexes
|
||||
|
||||
(field_expression
|
||||
(identifier) @field .)
|
||||
|
||||
(index_expression
|
||||
(_)
|
||||
(range_expression
|
||||
(identifier) @constant.builtin .)
|
||||
(#eq? @constant.builtin "end"))
|
||||
|
||||
|
||||
;;; Function names
|
||||
|
|
@ -79,13 +71,14 @@
|
|||
;; Definitions
|
||||
|
||||
(abstract_definition
|
||||
name: (identifier) @type.definition
|
||||
(subtype_clause (identifier) @type))
|
||||
name: (identifier) @type.definition)
|
||||
(primitive_definition
|
||||
name: (identifier) @type.definition
|
||||
(subtype_clause (identifier) @type))
|
||||
name: (identifier) @type.definition)
|
||||
(struct_definition
|
||||
name: (identifier) @type)
|
||||
(subtype_clause [
|
||||
(identifier) @type
|
||||
(field_expression (identifier) @type .)])
|
||||
|
||||
;; Annotations
|
||||
|
||||
|
|
@ -109,6 +102,8 @@
|
|||
;;; Keywords
|
||||
|
||||
[
|
||||
"global"
|
||||
"local"
|
||||
"macro"
|
||||
"struct"
|
||||
"type"
|
||||
|
|
@ -117,9 +112,6 @@
|
|||
|
||||
"end" @keyword
|
||||
|
||||
((identifier) @keyword
|
||||
(#any-of? @keyword "global" "local")) ; Grammar error
|
||||
|
||||
(compound_statement
|
||||
["begin" "end"] @keyword)
|
||||
(quote_statement
|
||||
|
|
@ -185,11 +177,10 @@
|
|||
|
||||
(operator) @operator
|
||||
(for_binding ["in" "=" "∈"] @operator)
|
||||
(pair_expression "=>" @operator)
|
||||
(range_expression ":" @operator)
|
||||
|
||||
(slurp_parameter "..." @operator)
|
||||
(spread_expression "..." @operator)
|
||||
(splat_expression "..." @operator)
|
||||
|
||||
"." @operator
|
||||
["::" "<:"] @operator
|
||||
|
|
|
|||
|
|
@ -3,24 +3,25 @@
|
|||
(macro_definition)
|
||||
(function_definition)
|
||||
|
||||
(compound_statement)
|
||||
(if_statement)
|
||||
(try_statement)
|
||||
(for_statement)
|
||||
(while_statement)
|
||||
(let_statement)
|
||||
(quote_statement)
|
||||
|
||||
(do_clause)
|
||||
(compound_statement)
|
||||
|
||||
(assignment)
|
||||
(for_binding)
|
||||
|
||||
(binary_expression)
|
||||
(call_expression)
|
||||
|
||||
(array_expression)
|
||||
(tuple_expression)
|
||||
(comprehension_expression)
|
||||
(matrix_expression)
|
||||
(vector_expression)
|
||||
] @indent
|
||||
|
||||
[
|
||||
|
|
|
|||
|
|
@ -1,4 +1,13 @@
|
|||
;; Inject markdown in docstrings
|
||||
((string_literal) @markdown
|
||||
. [
|
||||
(module_definition)
|
||||
(abstract_definition)
|
||||
(struct_definition)
|
||||
(function_definition)
|
||||
(assignment)
|
||||
(const_declaration)
|
||||
]
|
||||
(#match? @markdown "^\"\"\"")
|
||||
(#offset! @markdown 0 3 0 -3))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue