tree-sitter / tree-sitter-julia

Julia grammar for Tree-sitter
MIT License
93 stars 32 forks source link

abstract types in struct declarations are recognized as `variable` but not `type` #66

Closed ExpandingMan closed 1 year ago

ExpandingMan commented 1 year ago
abstract type A end
struct B <: A end

In the second line, A is correctly identified as a variable, but incorrectly not identified as a type.

ChrHorn commented 1 year ago

Parse tree looks fine to me, must be an issue with the queries.

(source_file [0, 0] - [1, 17]
  (abstract_definition [0, 0] - [0, 19]
    name: (identifier [0, 14] - [0, 15]))
  (struct_definition [1, 0] - [1, 17]
    name: (identifier [1, 7] - [1, 8])
    (subtype_clause [1, 9] - [1, 13]
      (identifier [1, 12] - [1, 13]))))