public BodyAST getLastBody() {
		if (!this.list.isEmpty()) {
			BodyOrRepeatAST b = this.list.get(this.list.size() - 1);
			if (b instanceof BodyAST) {
				return (BodyAST) b;
			} else if (b instanceof RepeatAST) {
				RepeatAST repeat = (RepeatAST) b;
				if (repeat.getSecondEnd() != null) {
					return repeat.getSecondEnd();
				} else if (repeat.getFirstEnd() != null) {
					return repeat.getFirstEnd();
				} else {
					return ((RepeatAST) b).getMain();
				}
			}
		} else {
			throw new RuntimeException(
			        "Voice has no initialized list of body or repeat.");
		}
		return null;

	}