@Override public boolean visit(Symbol node) { if (node.isType(See.symbolType)) { if (node.childAt(0).isType(Alias.symbolType)) { xrefPages.add(node.childAt(0).lastChild().childAt(0).getContent()); } else { xrefPages.add(node.childAt(0).getContent()); } } return true; }
@Override public boolean visit(Symbol node) { if (node.isType(See.symbolType)) { if (node.childAt(0).isType(Alias.symbolType)) { xrefPages.add(node.childAt(0).lastChild().childAt(0).getContent()); } else { xrefPages.add(node.childAt(0).getContent()); } } return true; }
private Maybe<Symbol> populateList(Parser parser, Symbol list) { Symbol nextSymbol = list; while (isList(nextSymbol)) { if (indent(nextSymbol) < indent(list)) break; if (nextSymbol != list) parser.moveNext(1); if (indent(nextSymbol) > indent(list)) { Maybe<Symbol> subList = populateList(parser, nextSymbol); if (subList.isNothing()) return Symbol.nothing; list.lastChild().add(subList.getValue()); } else { Symbol body = makeListBody(parser); if (parser.atEnd()) return Symbol.nothing; list.add(body); } nextSymbol = parser.peek(); } return new Maybe<>(list); }
private Maybe<Symbol> populateList(Parser parser, Symbol list) { Symbol nextSymbol = list; while (isList(nextSymbol)) { if (indent(nextSymbol) < indent(list)) break; if (nextSymbol != list) parser.moveNext(1); if (indent(nextSymbol) > indent(list)) { Maybe<Symbol> subList = populateList(parser, nextSymbol); if (subList.isNothing()) return Symbol.nothing; list.lastChild().add(subList.getValue()); } else { Symbol body = makeListBody(parser); if (parser.atEnd()) return Symbol.nothing; list.add(body); } nextSymbol = parser.peek(); } return new Maybe<>(list); }