| 4 | Category: enterprise, scripting |
| 5 | */ |
| 6 | function cos (hljs) { |
| 7 | |
| 8 | var STRINGS = { |
| 9 | className: 'string', |
| 10 | variants: [ |
| 11 | { |
| 12 | begin: '"', |
| 13 | end: '"', |
| 14 | contains: [{ // escaped |
| 15 | begin: "\"\"", |
| 16 | relevance: 0 |
| 17 | }] |
| 18 | } |
| 19 | ] |
| 20 | }; |
| 21 | |
| 22 | var NUMBERS = { |
| 23 | className: "number", |
| 24 | begin: "\\b(\\d+(\\.\\d*)?|\\.\\d+)", |
| 25 | relevance: 0 |
| 26 | }; |
| 27 | |
| 28 | var COS_KEYWORDS = |
| 29 | 'property parameter class classmethod clientmethod extends as break ' + |
| 30 | 'catch close continue do d|0 else elseif for goto halt hang h|0 if job ' + |
| 31 | 'j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 ' + |
| 32 | 'tcommit throw trollback try tstart use view while write w|0 xecute x|0 ' + |
| 33 | 'zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert ' + |
| 34 | 'zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit ' + |
| 35 | 'zsync ascii'; |
| 36 | |
| 37 | // registered function - no need in them due to all functions are highlighted, |
| 38 | // but I'll just leave this here. |
| 39 | |
| 40 | //"$bit", "$bitcount", |
| 41 | //"$bitfind", "$bitlogic", "$case", "$char", "$classmethod", "$classname", |
| 42 | //"$compile", "$data", "$decimal", "$double", "$extract", "$factor", |
| 43 | //"$find", "$fnumber", "$get", "$increment", "$inumber", "$isobject", |
| 44 | //"$isvaliddouble", "$isvalidnum", "$justify", "$length", "$list", |
| 45 | //"$listbuild", "$listdata", "$listfind", "$listfromstring", "$listget", |
| 46 | //"$listlength", "$listnext", "$listsame", "$listtostring", "$listvalid", |
| 47 | //"$locate", "$match", "$method", "$name", "$nconvert", "$next", |
| 48 | //"$normalize", "$now", "$number", "$order", "$parameter", "$piece", |
| 49 | //"$prefetchoff", "$prefetchon", "$property", "$qlength", "$qsubscript", |
| 50 | //"$query", "$random", "$replace", "$reverse", "$sconvert", "$select", |
| 51 | //"$sortbegin", "$sortend", "$stack", "$text", "$translate", "$view", |
| 52 | //"$wascii", "$wchar", "$wextract", "$wfind", "$wiswide", "$wlength", |
| 53 | //"$wreverse", "$xecute", "$zabs", "$zarccos", "$zarcsin", "$zarctan", |
| 54 | //"$zcos", "$zcot", "$zcsc", "$zdate", "$zdateh", "$zdatetime", |
| 55 | //"$zdatetimeh", "$zexp", "$zhex", "$zln", "$zlog", "$zpower", "$zsec", |
| 56 | //"$zsin", "$zsqr", "$ztan", "$ztime", "$ztimeh", "$zboolean", |
| 57 | //"$zconvert", "$zcrc", "$zcyc", "$zdascii", "$zdchar", "$zf", |
| 58 | //"$ziswide", "$zlascii", "$zlchar", "$zname", "$zposition", "$zqascii", |
| 59 | //"$zqchar", "$zsearch", "$zseek", "$zstrip", "$zwascii", "$zwchar", |
| 60 | //"$zwidth", "$zwpack", "$zwbpack", "$zwunpack", "$zwbunpack", "$zzenkaku", |
| 61 | //"$change", "$mv", "$mvat", "$mvfmt", "$mvfmts", "$mviconv", |
| 62 | //"$mviconvs", "$mvinmat", "$mvlover", "$mvoconv", "$mvoconvs", "$mvraise", |
| 63 | //"$mvtrans", "$mvv", "$mvname", "$zbitand", "$zbitcount", "$zbitfind", |