示例#1
0
        public override void VisitSwitchSection(SwitchSectionSyntax node)
        {
            if (debug)
            {
                Console.WriteLine(node.ToFullString());
            }
            var nl = OurLine.NewLine(LineKind.Decl, "SwitchSection");

            OurLine.AddEssentialInfo(ref nl, "labels:" + node.Labels.ToString());
            // OurLine.AddEssentialInfo(ref nl, node.Labels.Select((l) => l.Value.ToString()));
            OurLine.AddEssentialInfo(ref nl, "statements:" + node.Statements.ToString());

            nl.Source     = node.ToFullString();
            nl.ParentKind = node.Parent.RawKind;
            nl.RawKind    = node.RawKind;
            LogCommand(nl);
            StartBlock("SwitchSection");
            base.VisitSwitchSection(node);
            EndBlock("SwitchSection");
        }