julia: update queries to parser change (#3956)

This commit is contained in:
Sergio A. Vargas 2022-12-14 03:06:08 -05:00 committed by GitHub
parent bfb875673e
commit d31c71c959
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 21 deletions

View file

@ -201,7 +201,7 @@
"revision": "768a384989391237c6d55ff3d878a0d1e0d2b4fa"
},
"julia": {
"revision": "91ba1c3c9b50f388d4b67518c04bc9a003ed3475"
"revision": "36b099e9ea577f64ba53323115028dadd2991d2c"
},
"kotlin": {
"revision": "b953dbdd05257fcb2b64bc4d9c1578fac12e3c28"

View file

@ -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

View file

@ -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
[

View file

@ -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))