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

version» Context lines:

pike.git/lib/modules/Tools.pmod/Standalone.pmod/pike_to_html.pike:111:   Unicode   VCDiff   Val   Web   Yabu   Yp   ZXID   _Ffmpeg   __builtin";    - protected mapping(string:int(1..1)) delims, reserved, types, consts, ns, mods; + protected multiset(string) delims, reserved, types, consts, ns, mods;      final int(0..1) main(int argc, array(string) argv)   {    if (argc == 1) {    werror("Missing argument.%s\n", HELP);    return 1;    }       string h = #"<!doctype html>   <html>
pike.git/lib/modules/Tools.pmod/Standalone.pmod/pike_to_html.pike:190:   //! Strings: string   //! @item   //! Comments: comment   //! @item   //! Macros: macro   //! @endul   //!   //! @param code   string convert(string code)   { -  delims = ([]); -  reserved = ([]); -  types = ([]); -  consts = ([]); -  ns = ([]); -  mods = ([]); -  -  map(delimiters/1, lambda (string s) { delims[s] = 1; }); -  map(res_words/"|", lambda (string s) { reserved[s] = 1; }); -  map(type/"|", lambda (string s) { types[s] = 1; }); -  map(constants/"|", lambda (string s) { consts[s] = 1; }); -  map(namespaces/"\n", lambda (string s) { ns[s] = 1; }); -  map(modifiers/"|", lambda (string s) { mods[s] = 1; }); -  +  delims = (multiset)(delimiters/1); +  reserved = (multiset)(res_words/"|"); +  types = (multiset)(type/"|"); +  consts = (multiset)(constants/"|"); +  ns = (multiset)(namespaces/"\n"); +  mods = (multiset)(modifiers/"|");    return make_html(Parser.Pike.split(code));   }      #define ADDTAG(TYP) add("<span class='" + TYP + "'>" + \    replace(tok, ([ "&" : "&amp;", \    "<" : "&lt;", \    ">" : "&gt;" ])) + "</span>")   #define ADD() add(replace(tok, ([ "&" : "&amp;", "<" : "&lt;", ">" : "&gt;" ])))         Newline at end of file added.