Esempio n. 1
0
        public JNode VisitCaseLabel(CaseLabel node)
        {
            var node2 = new JSwitchLabel
            {
                IsDefault  = node.Expression.IsNull, //the alternative doesn't work: node.Role == CaseLabel.DefaultKeywordRole,
                Expression = VisitExpression(node.Expression),
            };

            return(node2);
        }
Esempio n. 2
0
 public void VisitSwitchLabel(JSwitchLabel node)
 {
     if (node.IsDefault)
     {
         Write("default");
     }
     else
     {
         Write("case");
         Visit(node.Expression);
     }
     Write(":");
     WriteLine();
 }