l0bsterssg

node.js static responsive blog post generator
Log | Files | Refs | README

hsp.js (3938B)


      1 /*
      2 Language: HSP
      3 Author: prince <MC.prince.0203@gmail.com>
      4 Website: https://en.wikipedia.org/wiki/Hot_Soup_Processor
      5 Category: scripting
      6 */
      7 
      8 function hsp(hljs) {
      9   return {
     10     name: 'HSP',
     11     case_insensitive: true,
     12     keywords: {
     13       $pattern: /[\w._]+/,
     14       keyword: 'goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop'
     15     },
     16     contains: [
     17       hljs.C_LINE_COMMENT_MODE,
     18       hljs.C_BLOCK_COMMENT_MODE,
     19       hljs.QUOTE_STRING_MODE,
     20       hljs.APOS_STRING_MODE,
     21 
     22       {
     23         // multi-line string
     24         className: 'string',
     25         begin: '{"', end: '"}',
     26         contains: [hljs.BACKSLASH_ESCAPE]
     27       },
     28 
     29       hljs.COMMENT(';', '$', {relevance: 0}),
     30 
     31       {
     32         // pre-processor
     33         className: 'meta',
     34         begin: '#', end: '$',
     35         keywords: {'meta-keyword': 'addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib'},
     36         contains: [
     37           hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'meta-string'}),
     38           hljs.NUMBER_MODE,
     39           hljs.C_NUMBER_MODE,
     40           hljs.C_LINE_COMMENT_MODE,
     41           hljs.C_BLOCK_COMMENT_MODE
     42         ]
     43       },
     44 
     45       {
     46         // label
     47         className: 'symbol',
     48         begin: '^\\*(\\w+|@)'
     49       },
     50 
     51       hljs.NUMBER_MODE,
     52       hljs.C_NUMBER_MODE
     53     ]
     54   };
     55 }
     56 
     57 module.exports = hsp;