private string DeclareExplicitVariant(VBAParser.ConstSubStmtContext context, out string instruction) { if (context == null) { instruction = null; return null; } var parent = (VBAParser.ConstStmtContext) context.Parent; instruction = parent.GetText(); var constant = context.GetText(); var replacement = context.ambiguousIdentifier().GetText() + ' ' + Tokens.As + ' ' + Tokens.Variant + ' ' + context.EQ().GetText() + ' ' + context.valueStmt().GetText(); var result = instruction.Replace(constant, replacement); return result; }