All Downloads are FREE. Search and download functionalities are using the official Maven repository.

EOorg.EOeolang.EOswitch Maven / Gradle / Ivy

/*
 * This file was auto-generated by eolang-maven-plugin
 * on 2022-07-25T15:16:33.726Z. Don't edit it,
 * your changes will be discarded on the next build.
 *
 * The EO sources were compiled to XMIR on
 * 2022-07-25T15:15:45.995606Z by the compiler v.0.24.0.
 */

package EOorg.EOeolang;

import org.eolang.*;

//  
//   
//    
//      
//        
//          
//           
//         
//         0
//       
//     
//      
//        
//          
//           
//         
//         0
//       
//        
//         
//         0
//       
//       true
//     
//      
//       switch cases are empty
//     
//   
//    
//     
//     
//   
// 
@XmirObject(name = "switch", oname = "switch", source = "/home/r/repo/target/eo/04-pull/org/eolang/switch.eo")
public final class EOswitch extends PhDefault {
  public EOswitch(final Phi sigma) {
    super(sigma);
    this.add("cases", new AtVararg(/* default */));
    this.add("φ", new AtOnce(new AtComposite(this, rho -> {
      Phi ret_base_base_base_base = new PhMethod(rho, "cases");
        ret_base_base_base_base = new PhLocated(ret_base_base_base_base, 47, 8);
      Phi ret_base_base_base = new PhMethod(ret_base_base_base_base, "length");
        ret_base_base_base = new PhLocated(ret_base_base_base, 47, 13);
      Phi ret_base_base = new PhMethod(ret_base_base_base, "eq");
        ret_base_base = new PhLocated(ret_base_base, 46, 6);
      ret_base_base = new PhCopy(ret_base_base);
        Phi ret_base_base_1 = new EOorg.EOeolang.EOint(Phi.Φ);
          ret_base_base_1 = new PhLocated(ret_base_base_1, 48, 8);
          ret_base_base_1 = new PhWith(ret_base_base_1, "Δ", new Data.Value(0L));
        ret_base_base = new PhWith(ret_base_base, 0, ret_base_base_1);
      Phi ret_base = new PhMethod(ret_base_base, "not");
        ret_base = new PhLocated(ret_base, 45, 4);
      Phi ret = new PhMethod(ret_base, "if");
        ret = new PhLocated(ret, 44, 2);
      ret = new PhCopy(ret);
        Phi ret_1_base_base_base = new PhMethod(rho, "arr");
        Phi ret_1_base_base = new PhMethod(ret_1_base_base_base, "length");
          ret_1_base_base = new PhLocated(ret_1_base_base, 51, 8);
        Phi ret_1_base = new PhMethod(ret_1_base_base, "gt");
          ret_1_base = new PhLocated(ret_1_base, 50, 6);
        ret_1_base = new PhCopy(ret_1_base);
          Phi ret_1_base_1 = new EOorg.EOeolang.EOint(Phi.Φ);
            ret_1_base_1 = new PhLocated(ret_1_base_1, 62, 8);
            ret_1_base_1 = new PhWith(ret_1_base_1, "Δ", new Data.Value(0L));
          ret_1_base = new PhWith(ret_1_base, 0, ret_1_base_1);
        Phi ret_1 = new PhMethod(ret_1_base, "if");
          ret_1 = new PhLocated(ret_1, 49, 4);
        ret_1 = new PhCopy(ret_1);
          Phi ret_1_1_base = new PhMethod(rho, "arr");
            ret_1_1_base = new PhLocated(ret_1_1_base, 63, 6);
          Phi ret_1_1 = new PhMethod(ret_1_1_base, "at");
            ret_1_1 = new PhLocated(ret_1_1, 63, 9);
          ret_1_1 = new PhCopy(ret_1_1);
            Phi ret_1_1_1 = new EOorg.EOeolang.EOint(Phi.Φ);
              ret_1_1_1 = new PhLocated(ret_1_1_1, 63, 13);
              ret_1_1_1 = new PhWith(ret_1_1_1, "Δ", new Data.Value(0L));
            ret_1_1 = new PhWith(ret_1_1, 0, ret_1_1_1);
          Phi ret_1_2 = new EOorg.EOeolang.EObool(Phi.Φ);
            ret_1_2 = new PhLocated(ret_1_2, 64, 6);
            ret_1_2 = new PhWith(ret_1_2, "Δ", new Data.Value(true));
          ret_1 = new PhWith(ret_1, 0, ret_1_1);
          ret_1 = new PhWith(ret_1, 1, ret_1_2);
        Phi ret_2 = Phi.Φ.attr("org").get().attr("eolang").get().attr("error").get();
          ret_2 = new PhLocated(ret_2, 65, 4);
        ret_2 = new PhCopy(ret_2);
          Phi ret_2_1 = new EOorg.EOeolang.EOstring(Phi.Φ);
            ret_2_1 = new PhLocated(ret_2_1, 65, 10);
            ret_2_1 = new PhWith(ret_2_1, "Δ", new Data.Value("switch cases are empty"));
          ret_2 = new PhWith(ret_2, 0, ret_2_1);
        ret = new PhWith(ret, 0, ret_1);
        ret = new PhWith(ret, 1, ret_2);
      return ret;
    })));
    this.add("arr", new AtOnce(new AtComposite(this, rho -> {
      Phi ret = new EOswitch$EOarr(rho);
        ret = new PhLocated(ret, 52, 10);
      return ret;
    })));
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy