@Override
	public String toString() {
		if (firstEnd == null && secondEnd == null) {
			return "RepeatAST[" + this.main.toString() + "]";
		} else if (firstEnd == null || secondEnd == null) {
			throw new RuntimeException(
			        "The two endings need to be null or non-null at the same time.");
		} else {
			return "RepeatAST[Main: " + this.main.toString() + "\nEnd1: "
			        + this.firstEnd.toString() + "\nEnd2: "
			        + this.secondEnd.toString() + "]";
		}
	}