From aa2156b21be1500352832876dc65c5a0eaf7a689 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Wed, 24 Jan 2024 00:54:43 -0500 Subject: [PATCH] fix: generic annotation parents are types --- grammar.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/grammar.js b/grammar.js index 613825e..ba24709 100644 --- a/grammar.js +++ b/grammar.js @@ -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), ),