Skip to content

Commit 8bab6ea

Browse files
committed
reinstated "Loading references" parser state
1 parent 52135ae commit 8bab6ea

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Rubberduck.Parsing/VBA/RubberduckParser.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ public void Parse()
9090
.Where(project => project.Protection == vbext_ProjectProtection.vbext_pp_none)
9191
.ToList();
9292

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+
9399
if (!_state.AllDeclarations.Any(item => item.IsBuiltIn))
94100
{
95101
var references = projects.SelectMany(p => p.References.Cast<Reference>()).ToList();
@@ -103,7 +109,6 @@ public void Parse()
103109
}
104110
}
105111

106-
var components = projects.SelectMany(p => p.VBComponents.Cast<VBComponent>()).ToList();
107112
foreach (var component in components)
108113
{
109114
_state.SetModuleState(component, ParserState.Pending);
@@ -134,6 +139,12 @@ private void ParseAll()
134139
.Where(project => project.Protection == vbext_ProjectProtection.vbext_pp_none)
135140
.ToList();
136141

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+
137148
if (!_state.AllDeclarations.Any(item => item.IsBuiltIn))
138149
{
139150
var references = projects.SelectMany(p => p.References.Cast<Reference>()).ToList();
@@ -147,7 +158,6 @@ private void ParseAll()
147158
}
148159
}
149160

150-
var components = projects.SelectMany(p => p.VBComponents.Cast<VBComponent>()).ToList();
151161
foreach (var component in components)
152162
{
153163
_state.SetModuleState(component, ParserState.Pending);

0 commit comments

Comments
 (0)