File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,12 @@ public AttributeParser(IModuleExporter exporter)
3333        public  IDictionary < Tuple < string ,  DeclarationType > ,  Attributes >  Parse ( VBComponent  component ) 
3434        { 
3535            var  path  =  _exporter . Export ( component ) ; 
36+             if  ( ! File . Exists ( path ) ) 
37+             { 
38+                 // a document component without any code wouldn't be exported (file would be empty anyway). 
39+                 return  new  Dictionary < Tuple < string ,  DeclarationType > ,  Attributes > ( ) ; 
40+             } 
41+ 
3642            var  code  =  File . ReadAllText ( path ) ; 
3743            File . Delete ( path ) ; 
3844
@@ -63,6 +69,7 @@ private class AttributeListener : AttributesBaseListener
6369            public  AttributeListener ( Tuple < string , DeclarationType >  scope ) 
6470            { 
6571                _currentScope  =  scope ; 
72+                 _currentScopeAttributes  =  new  Attributes ( ) ; 
6673            } 
6774
6875            public  IDictionary < Tuple < string ,  DeclarationType > ,  Attributes >  Attributes 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments