@Override
	public String toString() {
		StringBuilder toPrint = new StringBuilder("");
		for (MusicUnitAST unit : this.unitList) {
			toPrint.append("\n        ");
			if (unit instanceof NoteAST) {
				toPrint.append(((NoteAST) unit).toString());
			} else if (unit instanceof ChordAST) {
				toPrint.append(((ChordAST) unit).toString());
			} else if (unit instanceof RestAST) {
				toPrint.append(((RestAST) unit).toString());
			}
			toPrint.append(", ");
		}
		if (toPrint.length() == 0) {
			return "MeasureAST[empty!]";
		} else {
			return "MeasureAST[" + toPrint.substring(0, toPrint.length() - 2)
			        + "]";
		}
	}