Ejemplo n.º 1
0
  private void show(CompileNode node, StringBuilder builder, int depth) {
    if (depth > 0) {
      for (int i = 0; i < depth; i++) {
        builder.append("\t");
      }

      builder.append(" -> ");

      builder.append(node.getMember().getMemberName());

      builder.append("[");

      if (node.getMember().isCompiled()) {
        builder.append("C");
      }

      if (node.isInlined()) {
        builder.append("I");
      }

      builder.append("]");

      if (depth == 0) {
        builder.append(C_NEWLINE);
      }
    }

    for (CompileNode child : node.getChildren()) {
      show(child, builder, depth + 1);
    }

    if (node.getChildren().size() == 0) {
      builder.append(C_NEWLINE);
    }
  }
Ejemplo n.º 2
0
 public void addChild(CompileNode child) {
   child.parent = this;
   children.add(child);
 }