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:88:   string render_tag(string tag, mapping(string:string) attrs, int|void term)   {    string res = "<" + tag;    foreach(sort(indices(attrs)), string attr) {    res += " " + attr + "='" + attrs[attr] + "'";    }    if (term) res += " /";    return res + ">";   }    - Node get_first_element(Node n) { + Node get_first_element(Node n) + { +  if (!n) return UNDEFINED;    foreach(n->get_children(), Node c)    if(c->get_node_type()==XML_ELEMENT) {    if(c->get_any_name()!="source-position")    return c;    else    position->update(c);    } -  error( "Node had no element child.\n" ); +  return UNDEFINED;   }      int section, subsection;      string low_parse_chapter(Node n, int chapter) {    string ret = "";    Node dummy = Node(XML_ELEMENT, "dummy", ([]), "");    foreach(n->get_elements(), Node c)    switch(c->get_any_name()) {   
pike.git/lib/modules/Tools.pmod/Standalone.pmod/autodoc_to_html.pike:1101: Inside #if 0
  #else    return "";   #endif   }   #endif /* 0 */      string parse_not_doc(Node n) {    string ret = "";    int method, argument, variable, const, typedf;    +  if (!n) return ""; +     foreach(n->get_children(), Node c) {       if(c->get_node_type()!=XML_ELEMENT)    continue;       Node cc;    switch(c->get_any_name()) {       case "doc":    continue;       case "source-position":    position->update(c);    continue;       case "method":    if(method++) ret += "<br />\n"; - #ifdef DEBUG + #if 0    if(!c->get_first_element("returntype")) -  continue; -  // error( "No returntype element in method element.\n" ); +  error( "No returntype element in method element.\n" );   #endif    switch( c->get_attributes()->name )    {    case "create":    ret += "<tt>" + parse_type(get_first_element(c->get_first_element("returntype"))); // Check for more children    ret += " ";    ret += c->get_attributes()->class_path+"<b>(</b>";    ret += parse_not_doc( c->get_first_element("arguments") );    ret += "<b>)</b></tt>";    break;