static Map parseDoubleArrowTreeCI(S text) { L lines = withoutEmpties(rtrimAll(lines(text))); if (empty(lines)) null; new L> nodes; new L indents; // indent of children nodes.add(ciMap()); indents.add(countIndent(first(lines))); for (S s : lines) { int indent = countIndent(s); while (indent < last(indents)) { removeLast(nodes); removeLast(indents); } L x = splitAtDoubleArrow(s); if (l(x) == 2) // leaf last(nodes).put(first(x), second(x)); else { Map newTree = ciMap(); last(nodes).put(s, newTree); nodes.add(newTree); indents.add(indent+1); } } ret tree; }