Package org.apache.etch.compiler.ast

Examples of org.apache.etch.compiler.ast.Builtin


      Named<?> n = type.getNamed( type.intf() );

      if (n.isBuiltin())
      {
        Builtin b = (Builtin) n;
        String cn = b.className();
        if (cn.endsWith( "?" ))
          cn = cn.substring( 0, cn.length()-1 );
       
        return String.format( "Validator_custom.Get( typeof(%s), %d, %s )",
          cn, type.dim(), b.allowSubclass() );
      }

      // Allow subclassing for etch defined structs and externs.

      if (n.isStruct() || n.isExcept())
View Full Code Here


      Named<?> n = type.getNamed( gIntf );

      if (n.isBuiltin())
      {
        Builtin b = (Builtin) n;
        String cn = b.className();
        if (cn.endsWith( "?" ))
          cn = cn.substring( 0, cn.length()-1 );
        return String.format( "Validator_custom.Get( typeof(%s), %d, %s )",
          cn, type.dim(), b.allowSubclass() );
      }

      // Allow subclassing for etch defined structs and externs.

      if (n.isStruct() || n.isExcept())
View Full Code Here

            type.dim());

      Named<?> n = type.getNamed(type.intf());

      if (n.isBuiltin()) {
        Builtin b = (Builtin) n;
        String cn = b.className();

        int i = cn.indexOf('<');
        if (i >= 0)
          cn = cn.substring(0, i);
       
View Full Code Here

      Named<?> n = type.getNamed( type.intf() );

      if (n.isBuiltin())
      {
        Builtin b = (Builtin) n;
        String cn = b.className();
       
        int i = cn.indexOf( '<' );
        if (i >= 0)
          cn = cn.substring( 0, i );
       
        return String.format( "Validator_custom.get( %s.class, %d, %s )",
          cn, type.dim(), b.allowSubclass() );
      }

      // Allow subclassing for etch defined structs and externs.

      if (n.isStruct() || n.isExcept())
View Full Code Here

      Named<?> n = type.getNamed( type.intf() );

      if (n.isBuiltin())
      {
        Builtin b = (Builtin) n;
        String cn = b.className();
       
        int i = cn.indexOf( '<' );
        if (i >= 0)
          cn = cn.substring( 0, i );
       
        return String.format( "Validator_custom.get( %s.class, %d, %s )",
          cn, type.dim(), b.allowSubclass() );
      }

      // Allow subclassing for etch defined structs and externs.

      if (n.isStruct() || n.isExcept())
View Full Code Here

      // System.out.println("Token: " + t.image);
      if (n == null)
        throw new IllegalArgumentException(String.format(
            "undefined or ambiguous name at line %d: %s", t.beginLine, t.image));
      if (n.isBuiltin()) {
        Builtin b = (Builtin) n;
        return nativeArrayName + b.className().substring(4);
      }
      if (n.isEnumx()) {
        return nativeArrayName + n.efqname(this);
      } else {
        return type.intf().name() + "::" + nativeArrayName + n.efqname(this);
View Full Code Here

      // System.out.println("Token: " + t.image);
      if (n == null)
        throw new IllegalArgumentException(String.format(
            "undefined or ambiguous name at line %d: %s", t.beginLine, t.image));
      if (n.isBuiltin()) {
        Builtin b = (Builtin) n;
        if (n.efqname(this).equals("EtchDate")) return b.className();
        if (n.efqname(this).equals("EtchList")) return b.className()+"<EtchObjectPtr> ";
        if (n.efqname(this).equals("EtchHashTable")) return b.className()+"<EtchObjectPtr, EtchObjectPtr> ";
        if (n.efqname(this).equals("EtchHashSet")) return b.className()+"<EtchObjectPtr> ";
        throw new IllegalArgumentException(String.format(
            "unable to find correct Etch data type for type at line %d: %s", t.beginLine, n.efqname(this)));
      }
      if (n.isEnumx()) {
        return n.efqname(this);
View Full Code Here

            this.getValidatorStringForParam(param), type.dim());

      Named<?> n = type.getNamed(type.intf());

      if (n.isBuiltin()) {
        Builtin b = (Builtin) n;

        String cn = b.className();
        if (n.efqname(this).equals("EtchHashTable")) {
          cn += "<EtchObjectPtr, EtchObjectPtr>";
        }
        if (n.efqname(this).equals("EtchHashSet")) {
          cn += "<EtchObjectPtr>";
        }
        if (n.efqname(this).equals("EtchList")) {
          cn += "<EtchObjectPtr>";
        }

        /*
         * int i = cn.indexOf( '<' ); if (i >= 0) cn = cn.substring( 0, i );
         */
        return String.format(
            "EtchValidatorCustom::Get(runtime, %d, %s::TYPE(), %s, tmpValue);",
            type.dim(), cn, b.allowSubclass());
      }

      // Allow subclassing for etch defined structs and externs.

      if (n.isStruct() || n.isExcept()) {
View Full Code Here

            type.dim());

      Named<?> n = type.getNamed(type.intf());

      if (n.isBuiltin()) {
        Builtin b = (Builtin) n;
        String cn = b.className();

        int i = cn.indexOf('<');
        if (i >= 0)
          cn = cn.substring(0, i);
       
View Full Code Here

TOP

Related Classes of org.apache.etch.compiler.ast.Builtin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.