File tree Expand file tree Collapse file tree 4 files changed +20
-3
lines changed 
tests/syntax_tests/data/printer/signature Expand file tree Collapse file tree 4 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 3636-  Remove deprecated pipe last (` |> ` ) syntax. https://github.com/rescript-lang/rescript/pull/7512 
3737-  Improve error message for pipe (` -> ` ) syntax. https://github.com/rescript-lang/rescript/pull/7520 
3838-  Improve a few error messages around various subtyping issues. https://github.com/rescript-lang/rescript/pull/7404 
39+ -  In module declarations, accept the invalid syntax ` M = {...} `  and format it to ` M : {...} ` . https://github.com/rescript-lang/rescript/pull/7527 
40+ 
41+ #### :house :  Internal 
42+ 
3943-  Refactor the ast for record expressions and patterns. https://github.com/rescript-lang/rescript/pull/7528 
4044
4145# 12.0.0-alpha.13  
Original file line number Diff line number Diff line change @@ -6541,10 +6541,15 @@ and parse_module_declaration_or_alias ~attrs p =
65416541    |  Colon  ->
65426542      Parser. next p;
65436543      parse_module_type p
6544-     |  Equal  ->
6544+     |  Equal  -> ( 
65456545      Parser. next p;
6546-       let  lident =  parse_module_long_ident ~lowercase: false  p in 
6547-       Ast_helper.Mty. alias lident
6546+       match  p.Parser. token with 
6547+       |  Lbrace  ->
6548+         (*  Parse `module M = {` as `module M : {` *) 
6549+         parse_module_type p
6550+       |  _  ->
6551+         let  lident =  parse_module_long_ident ~lowercase: false  p in 
6552+         Ast_helper.Mty. alias lident)
65486553    |  token  ->
65496554      Parser. err p (Diagnostics. unexpected token p.breadcrumbs);
65506555      Recover. default_module_type () 
Original file line number Diff line number Diff line change @@ -23,3 +23,8 @@ module LongNaaaaame: MyModule
2323
2424@attr
2525module LinkedList: module type of List
26+ 
27+ // turn `=` into `:`
28+ module M: {
29+   let x: int
30+ }
Original file line number Diff line number Diff line change @@ -24,3 +24,6 @@ module LongNaaaaame: MyModule
2424
2525@attr 
2626module  LinkedList : module  type of  List 
27+ 
28+ // turn `=` into `:` 
29+ module  M  =  { let  x : int  }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments