@@ -90,6 +90,12 @@ public void Parse()
90
90
. Where ( project => project . Protection == vbext_ProjectProtection . vbext_pp_none )
91
91
. ToList ( ) ;
92
92
93
+ var components = projects . SelectMany ( p => p . VBComponents . Cast < VBComponent > ( ) ) . ToList ( ) ;
94
+ foreach ( var component in components )
95
+ {
96
+ _state . SetModuleState ( component , ParserState . LoadingReference ) ;
97
+ }
98
+
93
99
if ( ! _state . AllDeclarations . Any ( item => item . IsBuiltIn ) )
94
100
{
95
101
var references = projects . SelectMany ( p => p . References . Cast < Reference > ( ) ) . ToList ( ) ;
@@ -103,7 +109,6 @@ public void Parse()
103
109
}
104
110
}
105
111
106
- var components = projects . SelectMany ( p => p . VBComponents . Cast < VBComponent > ( ) ) . ToList ( ) ;
107
112
foreach ( var component in components )
108
113
{
109
114
_state . SetModuleState ( component , ParserState . Pending ) ;
@@ -134,6 +139,12 @@ private void ParseAll()
134
139
. Where ( project => project . Protection == vbext_ProjectProtection . vbext_pp_none )
135
140
. ToList ( ) ;
136
141
142
+ var components = projects . SelectMany ( p => p . VBComponents . Cast < VBComponent > ( ) ) . ToList ( ) ;
143
+ foreach ( var component in components )
144
+ {
145
+ _state . SetModuleState ( component , ParserState . LoadingReference ) ;
146
+ }
147
+
137
148
if ( ! _state . AllDeclarations . Any ( item => item . IsBuiltIn ) )
138
149
{
139
150
var references = projects . SelectMany ( p => p . References . Cast < Reference > ( ) ) . ToList ( ) ;
@@ -147,7 +158,6 @@ private void ParseAll()
147
158
}
148
159
}
149
160
150
- var components = projects . SelectMany ( p => p . VBComponents . Cast < VBComponent > ( ) ) . ToList ( ) ;
151
161
foreach ( var component in components )
152
162
{
153
163
_state . SetModuleState ( component , ParserState . Pending ) ;
0 commit comments