Skip to content

Commit

Permalink
fix: generic annotation parents are types
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Jan 24, 2024
1 parent 734d55a commit aa2156b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,15 @@ module.exports = grammar({
generic_annotation: $ => seq(
'@generic',
$.identifier,
optional(seq(':', $.identifier)),
optional(seq(',', $.identifier, optional(seq(':', $.identifier)))),
optional(seq(':', field('parent_type', $.type))),
optional(seq(
',',
$.identifier,
optional(seq(
':',
field('parent_type', $.type),
)),
)),
optional($.comment),
),

Expand Down

0 comments on commit aa2156b

Please # to comment.