Package etch.compiler.opt.ToString

Examples of etch.compiler.opt.ToString.FieldItem


    if (!isExcept)
      fmts.add( new StringItem( name().name+"(" ) );

    if (hasExtends)
    {
      fmts.add( new FieldItem( isExcept ? "super.getMessage()" : "super.toString()" ) );
      fmts.add( new StringItem( "; " ) );
    }
   
    boolean first = true;
    for (Parameter p: list)
    {
      if (first)
      {
        first = false;
        fmts.add( new StringItem( p.name().name+"=" ) );
      }
      else
      {
        fmts.add( new StringItem( "; "+p.name().name+"=" ) );
      }
      fmts.add( new FieldItem( p.name().name ) );
    }
   
    if (!isExcept)
      fmts.add( new StringItem( ")" ) );
View Full Code Here


  {
    for (FmtItem i: fmts)
    {
      if (i instanceof FieldItem)
      {
        FieldItem fi = (FieldItem) i;
        if (!hasParameter( fi.value() ))
          throw new ParseException( String.format(
            "ToString: format list specifies parameter (%s) which does not exist at line %d",
            fi.value(), lineno ) );
      }
    }
  }
View Full Code Here

    for(int i=0;i<list.size();i++) {
      FmtItem item = list.get( i );

      if (item.value().contains( "super.getMessage()" )) {
        list.remove( i );
        list.add(i, new FieldItem"base.GetMessage()" ) );
      }
      if (item.value().contains( "super.toString()" )) {
        list.remove( i );
        list.add(i, new FieldItem"base.ToString()" ) );
      }
    }
  }
View Full Code Here

    for(int i=0;i<list.size();i++) {
      FmtItem item = list.get( i );

      if (item.value().contains( "super.getMessage()" )) {
        list.remove( i );
        list.add(i, new FieldItem"base.GetMessage()" ) );
      }
      if (item.value().contains( "super.toString()" )) {
        list.remove( i );
        list.add(i, new FieldItem"base.ToString()" ) );
      }
    }
  }
View Full Code Here

    if (!isExcept)
      fmts.add( new StringItem( name().name+"(" ) );

    if (hasExtends)
    {
      fmts.add( new FieldItem( isExcept ? "super.getMessage()" : "super.toString()" ) );
      fmts.add( new StringItem( "; " ) );
    }
   
    boolean first = true;
    for (Parameter p: list)
    {
      if (first)
      {
        first = false;
        fmts.add( new StringItem( p.name().name+"=" ) );
      }
      else
      {
        fmts.add( new StringItem( "; "+p.name().name+"=" ) );
      }
      fmts.add( new FieldItem( p.name().name ) );
    }
   
    if (!isExcept)
      fmts.add( new StringItem( ")" ) );
View Full Code Here

  {
    for (FmtItem i: fmts)
    {
      if (i instanceof FieldItem)
      {
        FieldItem fi = (FieldItem) i;
        if (!hasParameter( fi.value() ))
          throw new ParseException( String.format(
            "ToString: format list specifies parameter (%s) which does not exist at line %d",
            fi.value(), lineno ) );
      }
    }
  }
View Full Code Here

TOP

Related Classes of etch.compiler.opt.ToString.FieldItem

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.