1 if (! this.sh_languages) {
2 this.sh_languages = {};
4 sh_languages['cpp'] = [
7 /(\b(?:class|struct|typename))([ \t]+)([A-Za-z0-9_]+)/g,
8 ['sh_keyword', 'sh_normal', 'sh_classname'],
12 /\b(?:class|const_cast|delete|dynamic_cast|explicit|false|friend|inline|mutable|namespace|new|operator|private|protected|public|reinterpret_cast|static_cast|template|this|throw|true|try|typeid|typename|using|virtual)\b/g,
37 /(\bstruct)([ \t]+)([A-Za-z0-9_]+)/g,
38 ['sh_keyword', 'sh_normal', 'sh_classname'],
42 /^[ \t]*#(?:[ \t]*include)/g,
48 /^[ \t]*#(?:[ \t]*[A-Za-z0-9_]*)/g,
53 /\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,
68 /\b(?:__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|break|case|catch|cdecl|const|continue|default|do|else|enum|extern|for|goto|if|pascal|register|return|sizeof|static|struct|switch|typedef|union|volatile|while)\b/g,
73 /\b(?:bool|char|double|float|int|long|short|signed|unsigned|void|wchar_t)\b/g,
78 /~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,
88 /(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,
93 /([A-Za-z](?:[^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]|[_])*)((?:<.*>)?)(\s+(?=[*&]*[A-Za-z][^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]*\s*[`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\[\]]+))/g,
94 ['sh_usertype', 'sh_usertype', 'sh_normal'],
105 /(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,
127 /<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,
132 /<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,
138 /&(?:[A-Za-z0-9]+);/g,
143 /<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,
148 /<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,
159 /(?:TODO|FIXME|BUG)(?:[:]?)/g,
171 /([^=" \t>]+)([ \t]*)(=?)/g,
172 ['sh_type', 'sh_normal', 'sh_symbol'],
200 /([^=" \t>]+)([ \t]*)(=?)/g,
201 ['sh_type', 'sh_normal', 'sh_symbol'],
229 /([^=" \t>]+)([ \t]*)(=?)/g,
230 ['sh_type', 'sh_normal', 'sh_symbol'],
253 /(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,
275 /<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,
280 /<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,
286 /&(?:[A-Za-z0-9]+);/g,
291 /<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,
296 /<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,
307 /(?:TODO|FIXME|BUG)(?:[:]?)/g,
319 /(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,
324 /(?:TODO|FIXME|BUG)(?:[:]?)/g,