Esempio n. 1
0
        internal override void BeforeVisitChild()
        {
            base.BeforeVisitChild();

            // Not supported in VB.Net
            // VB6 reference: https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/aa243378(v=vs.60)

            var m = new UnSupportedGoSubReturn(ParserContext.Start.Line, ParserContext.Start.Column);

            RootModule.AddConversionMessage(m);
            var c = new VBConversionMessage(m);

            ParentCodeBlock.AddCodeModel(c);
        }
Esempio n. 2
0
        // For Demo
        internal override void BeforeVisitChild()
        {
            // Let base class parse other things first before adding warning
            base.BeforeVisitChild();

            // Give warning for Class_Terminate, cannot convert with 100% same behavior, requires manual re-factoring if doing critical tasks.
            var ctx        = ParserContext as VisualBasic6Parser.SubStmtContext;
            var methodName = ctx.ambiguousIdentifier().GetText();

            if (methodName.Equals("Class_Terminate", StringComparison.InvariantCultureIgnoreCase))
            {
                var m = new UnSupportedClassTerminate(ParserContext.Start.Line, ParserContext.Start.Column);
                RootModule.AddConversionMessage(m);
                var c = new VBConversionMessage(m);
                ParentCodeBlock.AddCodeModel(c);
            }
        }