Ejemplo n.º 1
0
 void _Visit(JsSwitchLabel node)
 {
     if (node.IsDefault)
     {
         Keyword("default");
     }
     else
     {
         Keyword("case");
         Space();
         Visit(node.Expression);
     }
     Control(":");
 }
 protected virtual void _visit( JsSwitchLabel node )
 {
     throw new NotImplementedException( "JsSwitchLabel" );
 }
 protected override void _visit( JsSwitchLabel node )
 {
     if (node != null)
     {
         visit( node.Expression );
     }
 }
 public static JsSwitchLabel getJsSwitchLabel(string label, bool isDefault = false)
 {
     JsSwitchLabel result = new JsSwitchLabel();
     result.IsDefault = isDefault;
     result.Expression = getJsCodeExpression(label);
     return result;
 }