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