Skip to content

Commit f930995

Browse files
authored
Merge pull request #175 from aspeddro/fix-polyvar-para
feat: relax rule to polyvar_declaration
2 parents b1cd8bc + 01b38c3 commit f930995

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ module.exports = grammar({
369369
$.polyvar_identifier,
370370
optional($.polyvar_parameters),
371371
),
372-
$._type_identifier
372+
$._inline_type
373373
)
374374
),
375375

test/corpus/type_declarations.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ type t = [>
220220

221221

222222
type foo<'a> = [> #Blue | #DeepBlue | #LightBlue ] as 'a
223+
type t<'w> = [M.t<'w>]
223224

224225
---
225226

@@ -243,7 +244,16 @@ type foo<'a> = [> #Blue | #DeepBlue | #LightBlue ] as 'a
243244
(polyvar_declaration (polyvar_identifier))
244245
(polyvar_declaration (polyvar_identifier))
245246
(polyvar_declaration (polyvar_identifier))
246-
(as_aliasing_type (type_identifier)))))
247+
(as_aliasing_type (type_identifier))))
248+
249+
(type_declaration
250+
(type_identifier)
251+
(type_parameters (type_identifier))
252+
(polyvar_type
253+
(polyvar_declaration
254+
(generic_type
255+
(type_identifier_path (module_identifier) (type_identifier))
256+
(type_arguments (type_identifier)))))))
247257

248258
===========================================
249259
Function

0 commit comments

Comments
 (0)