示例#1
0
 public virtual void Visit(JsSwitchLabel node)
 {
     DefaultVisit(node);
     if (node.Value != null)
     {
         node.Value.Accept(this);
     }
 }
示例#2
0
        public JsNode VisitCaseLabel(CaseLabel node)
        {
            var node2 = new JsSwitchLabel
            {
                IsDefault  = node.Expression.IsNull,                    //the alternative doesn't work: node.Role == CaseLabel.DefaultKeywordRole,
                Expression = VisitExpression(node.Expression),
            };

            return(node2);
        }
示例#3
0
 public virtual JsNode Visit(JsSwitchLabel node)
 {
     return(DefaultVisit(node, x =>
     {
         if (x.Value != null)
         {
             x.Value = (JsExpression)x.Value.Accept(this);
         }
         return x;
     }));
 }
示例#4
0
 public override void VisitSwitchLabel(JsSwitchLabel node)
 {
     if (node.IsDefault)
     {
         output.Append("default");
     }
     else
     {
         output.Append("case ");
         node.Value.Accept(this);
     }
     output.AppendLine(":");
 }
示例#5
0
 public void Visit(JsSwitchLabel node)
 {
     BeforeVisit(node);
     DefaultVisit(node, VisitSwitchLabel);
     AfterVisit(node);
 }
示例#6
0
 public virtual void VisitSwitchLabel(JsSwitchLabel node)
 {
 }