Skip to content

Commit 1c18f42

Browse files
committed
used ParseTreeWalker default instance, per antlr/antlr4#841 (comment)
1 parent 58869ed commit 1c18f42

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Rubberduck.Parsing/VBA/RubberduckParserReimpl.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,13 @@ private void ResolveDeclarations(VBComponent component, IParseTree tree)
244244

245245
try
246246
{
247-
var walker = new ParseTreeWalker();
248-
walker.Walk(new CombinedParseTreeListener(new IParseTreeListener[]{
247+
ParseTreeWalker.Default.Walk(new CombinedParseTreeListener(new IParseTreeListener[]{
249248
obsoleteCallStatementListener,
250249
obsoleteLetStatementListener,
251250
emptyStringLiteralListener,
252251
argListWithOneByRefParamListener,
253252
}), tree);
254-
// FIXME this are actually (almost) isnpection results.. we should handle them as such
253+
// FIXME these are actually (almost) isnpection results.. we should handle them as such
255254
_state.ArgListsWithOneByRefParam = argListWithOneByRefParamListener.Contexts.Select(context => new QualifiedContext(qualifiedModuleName, context));
256255
_state.EmptyStringLiterals = emptyStringLiteralListener.Contexts.Select(context => new QualifiedContext(qualifiedModuleName, context));
257256
_state.ObsoleteLetContexts = obsoleteLetStatementListener.Contexts.Select(context => new QualifiedContext(qualifiedModuleName, context));

0 commit comments

Comments
 (0)