示例#1
0
            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));
                }
            }
示例#2
0
 public override bool VisitModuleDeclarations(VBAParser.ModuleDeclarationsContext context)
 {
     return(!context.moduleDeclarationsElement().Any() ||
            context.moduleDeclarationsElement().All(Visit));
 }