コード例 #1
0
 @Override
 public String toString(int nesting) {
   String start = Rule.getIndent(nesting);
   StringBuilder txt = new StringBuilder(start);
   txt.append(getName());
   txt.append(" ");
   txt.append(getDeclarationsString(nesting));
   return txt.toString();
 }
コード例 #2
0
  public String getDeclarationsString(int nesting) {
    String start = Rule.getIndent(nesting);

    StringBuilder txt = new StringBuilder("{");

    txt.append(declarations.innerString(nesting + 1));

    txt.append("\n").append(start).append("}");

    return txt.toString();
  }