Skip to content

Commit 29ac896

Browse files
committed
Make the parameter for state and OldState non-optional.
1 parent 823f483 commit 29ac896

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

Rubberduck.Parsing/VBA/RubberduckParserState.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ public IReadOnlyList<Tuple<QualifiedModuleName, SyntaxErrorException>> ModuleExc
390390
public event EventHandler<ParserStateEventArgs> StateChanged;
391391

392392
private int _stateChangedInvocations;
393-
private void OnStateChanged(object requestor, CancellationToken token, ParserState state = ParserState.Pending, ParserState oldStatus = ParserState.Pending)
393+
private void OnStateChanged(object requestor, CancellationToken token, ParserState state, ParserState oldStatus)
394394
{
395395
Interlocked.Increment(ref _stateChangedInvocations);
396396

@@ -610,7 +610,7 @@ public void SetStatusAndFireStateChanged(object requestor, ParserState status, C
610610
{
611611
if (Status == status)
612612
{
613-
OnStateChanged(requestor, token, status);
613+
OnStateChanged(requestor, token, status, _status);
614614
}
615615
else
616616
{

RubberduckTests/Mocks/MockParser.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,6 @@ public static RubberduckParserState CreateAndParse(IVBE vbe, string serializedDe
121121
return parser.State;
122122
}
123123

124-
private static SynchronousParseCoordinator CreateWithLibraries(IVBE vbe, string serializedDeclarationsPath = null, IEnumerable<string> testLibraries = null)
125-
{
126-
var parser = Create(vbe, serializedDeclarationsPath);
127-
if (testLibraries != null)
128-
{
129-
foreach (var lib in testLibraries)
130-
{
131-
parser.State.AddTestLibrary(lib);
132-
}
133-
}
134-
return parser;
135-
}
136-
137124
private static readonly HashSet<DeclarationType> ProceduralTypes =
138125
new HashSet<DeclarationType>(new[]
139126
{

0 commit comments

Comments
 (0)