Esempio n. 1
0
            public override void ExitAttributeStmt(VBAParser.AttributeStmtContext context)
            {
                var name   = context.implicitCallStmt_InStmt().GetText().Trim();
                var values = context.literal().Select(e => e.GetText().Replace("\"", string.Empty)).ToList();

                _currentScopeAttributes.Add(name, values);
            }
        // get the name of the file
        public override void EnterAttributeStmt([NotNull] VBAParser.AttributeStmtContext context)
        {
            if (context.implicitCallStmt_InStmt().GetText() == "VB_Name")
            {
                FileName = context.literal()[0].GetText().Trim('"');
            }

            // remove all attributes
            Rewriter.Replace(context.Start, context.Stop, "");
        }