File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -1293,6 +1293,7 @@ module.exports = grammar({
12931293
12941294    closure_expression : $  =>  prec ( PREC . closure ,  seq ( 
12951295      optional ( 'static' ) , 
1296+       optional ( 'async' ) , 
12961297      optional ( 'move' ) , 
12971298      field ( 'parameters' ,  $ . closure_parameters ) , 
12981299      choice ( 
Original file line number Diff line number Diff line change @@ -87,6 +87,37 @@ async move {}
8787    (async_block
8888      (block))))
8989
90+ ================================================================================
91+ Async closure
92+ ================================================================================
93+ 
94+ let _ = async || ();
95+ 
96+ --------------------------------------------------------------------------------
97+ 
98+ (source_file
99+   (let_declaration
100+     (closure_expression
101+       (closure_parameters)
102+       (unit_expression))))
103+ 
104+ ================================================================================
105+ Async move async move closure
106+ ================================================================================
107+ 
108+ let a = async move || async move {};
109+ 
110+ --------------------------------------------------------------------------------
111+ 
112+ (source_file
113+   (let_declaration
114+     (identifier)
115+     (closure_expression
116+       (closure_parameters)
117+       (async_block
118+         (block)))))
119+ 
120+ 
90121================================================================================
91122Try Block
92123================================================================================
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments