Skip to content

Commit 2b7dcd1

Browse files
authored
Merge pull request #155 from aspeddro/feature-extensible-variant
Allow type identifier path for extensible variant
2 parents 1e03840 + 76967bc commit 2b7dcd1

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ module.exports = grammar({
250250
),
251251

252252
_type_declaration: $ => seq(
253-
$.type_identifier,
253+
choice($.type_identifier, $.type_identifier_path),
254254
optional($.type_parameters),
255255
optional(seq(
256256
choice('=', '+='),

queries/highlights.scm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
"->"
175175
"|>"
176176
":>"
177+
"+="
177178
(uncurry)
178179
] @operator
179180

test/corpus/type_declarations.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ type t = ..
118118

119119
type t += Other
120120

121-
type t +=
121+
type M.t +=
122122
| Point
123123
| Line
124124

@@ -133,7 +133,7 @@ type t +=
133133
(variant_declaration
134134
(variant_identifier))))
135135
(type_declaration
136-
(type_identifier)
136+
(type_identifier_path (module_identifier) (type_identifier))
137137
(variant_type
138138
(variant_declaration
139139
(variant_identifier))

0 commit comments

Comments
 (0)