in doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java [965:1042]
private void traverseDefinitionList() throws AptParseException {
if (block == null) {
return;
}
expectedBlock(DEFINITION_LIST_ITEM);
int listIndent = block.getIndent();
sink.definitionList();
sink.definitionListItem();
block.traverse();
nextBlock();
loop:
while (block != null) {
int blockIndent = block.getIndent();
switch (block.getType()) {
case PARAGRAPH:
if (blockIndent < listIndent) {
break loop;
}
/*FALLTHROUGH*/
case VERBATIM:
case FIGURE:
case TABLE:
case HORIZONTAL_RULE:
case PG_BREAK:
block.traverse();
nextBlock();
break;
case LIST_ITEM:
if (blockIndent < listIndent) {
break loop;
}
traverseList();
break;
case NUMBERED_LIST_ITEM:
if (blockIndent < listIndent) {
break loop;
}
traverseNumberedList();
break;
case DEFINITION_LIST_ITEM:
if (blockIndent < listIndent) {
break loop;
}
if (blockIndent > listIndent) {
traverseDefinitionList();
} else {
sink.definition_();
sink.definitionListItem_();
sink.definitionListItem();
block.traverse();
nextBlock();
}
break;
case LIST_BREAK:
if (blockIndent >= listIndent) {
nextBlock();
}
/*FALLTHROUGH*/
default:
// A block which ends the list.
break loop;
}
}
sink.definition_();
sink.definitionListItem_();
sink.definitionList_();
}