@@ -706,7 +706,7 @@ moduleSpfn:
706706 SynModuleSigDecl.Exception(synExnDefn, mWhole) }
707707
708708 | openDecl
709- { SynModuleSigDecl.Open($1, (rhs parseState 1)) }
709+ { SynModuleSigDecl.Open $1 }
710710
711711valSpfn:
712712 | opt_attributes opt_access VAL opt_attributes opt_inline opt_mutable opt_access nameop opt_explicitValTyparDecls COLON topTypeWithTypeConstraints optLiteralValueSpfn
@@ -1320,15 +1320,26 @@ moduleDefn:
13201320
13211321 /* 'open' declarations */
13221322 | openDecl
1323- { [ SynModuleDecl.Open($1, (rhs parseState 1)) ] }
1323+ { [ SynModuleDecl.Open $1 ] }
13241324
13251325openDecl:
1326- /* 'open' declarations */
13271326 | OPEN path
1328- { SynOpenDeclTarget.ModuleOrNamespace($2, (rhs parseState 2)) }
1327+ { let mOpen = rhs parseState 1
1328+ let mPath = $2.Range
1329+ SynOpenDeclTarget.ModuleOrNamespace($2, mPath), unionRanges mOpen mPath }
1330+
1331+ | OPEN recover
1332+ { let mOpen = rhs parseState 1
1333+ SynOpenDeclTarget.ModuleOrNamespace(SynLongIdent([], [], []), mOpen.EndRange), mOpen }
13291334
13301335 | OPEN typeKeyword appType
1331- { SynOpenDeclTarget.Type($3, (rhs parseState 3)) }
1336+ { let mOpen = rhs parseState 1
1337+ let mPath = $3.Range
1338+ SynOpenDeclTarget.Type($3, mPath), unionRanges mOpen mPath }
1339+
1340+ | OPEN typeKeyword recover
1341+ { let m = rhs2 parseState 1 2
1342+ SynOpenDeclTarget.ModuleOrNamespace(SynLongIdent([], [], []), m.EndRange), m }
13321343
13331344/* The right-hand-side of a module abbreviation definition */
13341345/* This occurs on the right of a module abbreviation (#light encloses the r.h.s. with OBLOCKBEGIN/OBLOCKEND) */
0 commit comments