示例#1
0
        public static CaseDefault Create(Context cx, DefaultSwitchLabelSyntax node, Switch parent, int child)
        {
            var ret = new CaseDefault(cx, node, parent, child);

            ret.TryPopulate();
            return(ret);
        }
示例#2
0
        public static Statement Create(Context cx, SwitchLabelSyntax node, Switch parent, int child)
        {
            switch (node.Kind())
            {
            case SyntaxKind.CaseSwitchLabel:
                return(CaseLabel.Create(cx, (CaseSwitchLabelSyntax)node, parent, child));

            case SyntaxKind.DefaultSwitchLabel:
                return(CaseDefault.Create(cx, (DefaultSwitchLabelSyntax)node, parent, child));

            case SyntaxKind.CasePatternSwitchLabel:
                return(CasePattern.Create(cx, (CasePatternSwitchLabelSyntax)node, parent, child));

            default:
                throw new InternalError(node, "Unhandled case label");
            }
        }