public override void ExitModuleDeclarations([NotNull] VBAParser.ModuleDeclarationsContext context) { var hasOptionExplicit = false; foreach (var element in context.moduleDeclarationsElement()) { if (element.moduleOption() is VBAParser.OptionExplicitStmtContext) { hasOptionExplicit = true; } } if (!hasOptionExplicit) { _contexts.Add(new QualifiedContext <ParserRuleContext>(CurrentModuleName, (ParserRuleContext)context.Parent)); } }
public override bool VisitModuleDeclarations(VBAParser.ModuleDeclarationsContext context) { return(!context.moduleDeclarationsElement().Any() || context.moduleDeclarationsElement().All(Visit)); }