public virtual void Visit(JsSwitchLabel node) { DefaultVisit(node); if (node.Value != null) { node.Value.Accept(this); } }
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); }
public virtual JsNode Visit(JsSwitchLabel node) { return(DefaultVisit(node, x => { if (x.Value != null) { x.Value = (JsExpression)x.Value.Accept(this); } return x; })); }
public override void VisitSwitchLabel(JsSwitchLabel node) { if (node.IsDefault) { output.Append("default"); } else { output.Append("case "); node.Value.Accept(this); } output.AppendLine(":"); }
public void Visit(JsSwitchLabel node) { BeforeVisit(node); DefaultVisit(node, VisitSwitchLabel); AfterVisit(node); }
public virtual void VisitSwitchLabel(JsSwitchLabel node) { }