File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -175,10 +175,7 @@ module.exports = grammar({
175175 $ . exception_declaration ,
176176 ) ,
177177
178- module_declaration : $ => seq (
179- 'module' ,
180- optional ( 'rec' ) ,
181- optional ( 'type' ) ,
178+ module_binding : $ => prec . left ( seq (
182179 field ( 'name' , choice ( $ . module_identifier , $ . type_identifier ) ) ,
183180 optional ( seq (
184181 ':' ,
@@ -187,7 +184,20 @@ module.exports = grammar({
187184 optional ( seq (
188185 '=' ,
189186 field ( 'definition' , $ . _module_definition ) ,
187+ repeat ( $ . _module_binding_and )
190188 ) ) ,
189+ ) ) ,
190+
191+ _module_binding_and : $ => seq (
192+ 'and' ,
193+ $ . module_binding
194+ ) ,
195+
196+ module_declaration : $ => seq (
197+ 'module' ,
198+ optional ( 'rec' ) ,
199+ optional ( 'type' ) ,
200+ $ . module_binding ,
191201 ) ,
192202
193203 _module_definition : $ => choice (
You can’t perform that action at this time.
0 commit comments