pike.git / lib / modules / Tools.pmod / Standalone.pmod / autodoc_to_html.pike

version» Context lines:

pike.git/lib/modules/Tools.pmod/Standalone.pmod/autodoc_to_html.pike:441:    foreach(d->get_elements(second), Node e)    elems += ({ layout(e) });    if(d->get_first_element("text"))    rows += ({ ({ elems, parse_text(d->get_first_element("text")) }) });    else    rows += ({ ({ elems }) });    }    nicebox(rows, ret);   }    + //! Typically called with a <group/> node or a sub-node that is a container.   string parse_text(Node n, void|String.Buffer ret) {    if(n->get_node_type()==XML_TEXT && n->get_text()) {    if(ret)    ret->add(quote(n->get_test()));    else    return quote(n->get_text());    }       int cast;    if(!ret) {
pike.git/lib/modules/Tools.pmod/Standalone.pmod/autodoc_to_html.pike:536:    if(c->count_children() &&    ((flags & (Tools.AutoDoc.FLAG_KEEP_GOING|Tools.AutoDoc.FLAG_DEBUG)) ==    Tools.AutoDoc.FLAG_DEBUG)) {    error( "dl item has a child.\n" );    }    break;       case "mapping":    build_box(c, ret, "group", "member",    lambda(Node n) { -  return "<font color='green'>" + -  parse_text(n->get_first_element("index")) + -  "</font> : " + -  parse_type(get_first_element(n->get_first_element("type"))); +  string res = ""; +  Node nn = n->get_first_element("index"); +  if (nn) { +  res += +  "<font color='green'>" + parse_text(nn) + "</font> : "; +  } +  nn = n->get_first_element("type"); +  if (nn) { +  res += parse_type(get_first_element(nn)); +  } +  return res;    });    break;       case "array":    build_box(c, ret, "group", "elem",    lambda(Node n) {    string index ="";    if(n->get_first_element("index"))    index = parse_text(n->get_first_element("index"));    else {
pike.git/lib/modules/Tools.pmod/Standalone.pmod/autodoc_to_html.pike:784:       default:    error( "Unknown group type \"" + name + "\".\n" );    }    }       return ret;   }      string parse_type(Node n, void|string debug) { -  if(n->get_node_type()!=XML_ELEMENT) +  if(!n || (n->get_node_type()!=XML_ELEMENT))    return "";       string ret = "";    Node c, d;    switch(n->get_any_name()) {       case "object":    if(n->count_children()) {    if (resolve_reference) {    ret += "<font color='#005080'>" +