File tree Expand file tree Collapse file tree 2 files changed +23
-4
lines changed
Expand file tree Collapse file tree 2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ module.exports = grammar({
175175 $ . exception_declaration ,
176176 ) ,
177177
178- module_binding : $ => prec . left ( seq (
178+ _module_binding : $ => prec . left ( seq (
179179 field ( 'name' , choice ( $ . module_identifier , $ . type_identifier ) ) ,
180180 optional ( seq (
181181 ':' ,
@@ -190,14 +190,14 @@ module.exports = grammar({
190190
191191 _module_binding_and : $ => seq (
192192 'and' ,
193- $ . module_binding
193+ $ . _module_binding
194194 ) ,
195195
196196 module_declaration : $ => seq (
197197 'module' ,
198198 optional ( 'rec' ) ,
199199 optional ( 'type' ) ,
200- $ . module_binding ,
200+ $ . _module_binding ,
201201 ) ,
202202
203203 _module_definition : $ => choice (
Original file line number Diff line number Diff line change @@ -287,14 +287,33 @@ module rec BYOBReader: {
287287 include Reader
288288} = BYOBReader
289289
290+ module rec A: T = {
291+ let x = B.x
292+ }
293+ and B: T = {
294+ let x = 1
295+ }
296+
290297---
291298
292299(source_file
293300 (module_declaration
294301 (module_identifier)
295302 (block
296303 (include_statement (module_identifier)))
297- (module_identifier)))
304+ (module_identifier))
305+
306+ (module_declaration
307+ (module_identifier) (module_identifier)
308+ (block
309+ (let_binding
310+ (value_identifier)
311+ (value_identifier_path
312+ (module_identifier) (value_identifier))))
313+ (module_identifier) (module_identifier)
314+ (block
315+ (let_binding
316+ (value_identifier) (number)))))
298317
299318===========================================
300319Definition through extension
You can’t perform that action at this time.
0 commit comments