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:1: - #pike __REAL_VERSION__ -  +    //! Convert Pike code to HTML with syntax highlighting   //!   //! @code   //! pike -x pike_to_html /path/to/file.pike > file.html   //! @endcode    -  + #pike __REAL_VERSION__ +    constant description = "Pike code to syntax highlighted HTML converter";      constant HELP = #"   Converts either a string of code or a Pike file into syntax highlighted HTML.   The generated HTML will be written to stdout.      Usage:    pike -x pike_to_html \"path to file or string of code\"   ";   
pike.git/lib/modules/Tools.pmod/Standalone.pmod/pike_to_html.pike:167:       write(sprintf(h, title, convert(code)));    return 0;   }      //! Turn @[code] into HTML.   //!   //! The following css classes will be used:   //!   //! @ul - //! @item Delimiters: delim - //! @item Reserved words: lang - //! @item Data types: types - //! @item Constants: const - //! @item Modifiers: mods - //! @item Root namespaces: ns - //! @item Strings: string - //! @item Comments: comment - //! @item Macros: macro + //! @item + //! Delimiters: delim + //! @item + //! Reserved words: lang + //! @item + //! Data types: types + //! @item + //! Constants: const + //! @item + //! Modifiers: mods + //! @item + //! Root namespaces: ns + //! @item + //! 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; });