From 1c18f42c3696e08f1116298e4d7ebb542f04a5e3 Mon Sep 17 00:00:00 2001 From: Mathieu Guindon Date: Fri, 1 Apr 2016 01:06:12 -0400 Subject: [PATCH] used ParseTreeWalker default instance, per https://github.com/antlr/antlr4/issues/841#issuecomment-84063357 --- Rubberduck.Parsing/VBA/RubberduckParserReimpl.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Rubberduck.Parsing/VBA/RubberduckParserReimpl.cs b/Rubberduck.Parsing/VBA/RubberduckParserReimpl.cs index 949f17e328..a761c97af6 100644 --- a/Rubberduck.Parsing/VBA/RubberduckParserReimpl.cs +++ b/Rubberduck.Parsing/VBA/RubberduckParserReimpl.cs @@ -244,14 +244,13 @@ private void ResolveDeclarations(VBComponent component, IParseTree tree) try { - var walker = new ParseTreeWalker(); - walker.Walk(new CombinedParseTreeListener(new IParseTreeListener[]{ + ParseTreeWalker.Default.Walk(new CombinedParseTreeListener(new IParseTreeListener[]{ obsoleteCallStatementListener, obsoleteLetStatementListener, emptyStringLiteralListener, argListWithOneByRefParamListener, }), tree); - // FIXME this are actually (almost) isnpection results.. we should handle them as such + // FIXME these are actually (almost) isnpection results.. we should handle them as such _state.ArgListsWithOneByRefParam = argListWithOneByRefParamListener.Contexts.Select(context => new QualifiedContext(qualifiedModuleName, context)); _state.EmptyStringLiterals = emptyStringLiteralListener.Contexts.Select(context => new QualifiedContext(qualifiedModuleName, context)); _state.ObsoleteLetContexts = obsoleteLetStatementListener.Contexts.Select(context => new QualifiedContext(qualifiedModuleName, context));