highlight.js
Advanced tools
Comparing version 7.1.0 to 7.2.0
80
1c.js
@@ -46,44 +46,42 @@ module.exports = function(hljs){ | ||
case_insensitive: true, | ||
defaultMode: { | ||
lexems: IDENT_RE_RU, | ||
keywords: {keyword: OneS_KEYWORDS, built_in: OneS_BUILT_IN}, | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.NUMBER_MODE, | ||
STR_START, STR_CONT, | ||
{ | ||
className: 'function', | ||
begin: '(процедура|функция)', end: '$', | ||
lexems: IDENT_RE_RU, | ||
keywords: 'процедура функция', | ||
contains: [ | ||
{className: 'title', begin: IDENT_RE_RU}, | ||
{ | ||
className: 'tail', | ||
endsWithParent: true, | ||
contains: [ | ||
{ | ||
className: 'params', | ||
begin: '\\(', end: '\\)', | ||
lexems: IDENT_RE_RU, | ||
keywords: 'знач', | ||
contains: [STR_START, STR_CONT] | ||
}, | ||
{ | ||
className: 'export', | ||
begin: 'экспорт', endsWithParent: true, | ||
lexems: IDENT_RE_RU, | ||
keywords: 'экспорт', | ||
contains: [hljs.C_LINE_COMMENT_MODE] | ||
} | ||
] | ||
}, | ||
hljs.C_LINE_COMMENT_MODE | ||
] | ||
}, | ||
{className: 'preprocessor', begin: '#', end: '$'}, | ||
{className: 'date', begin: '\'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})\''} | ||
] | ||
} | ||
lexems: IDENT_RE_RU, | ||
keywords: {keyword: OneS_KEYWORDS, built_in: OneS_BUILT_IN}, | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.NUMBER_MODE, | ||
STR_START, STR_CONT, | ||
{ | ||
className: 'function', | ||
begin: '(процедура|функция)', end: '$', | ||
lexems: IDENT_RE_RU, | ||
keywords: 'процедура функция', | ||
contains: [ | ||
{className: 'title', begin: IDENT_RE_RU}, | ||
{ | ||
className: 'tail', | ||
endsWithParent: true, | ||
contains: [ | ||
{ | ||
className: 'params', | ||
begin: '\\(', end: '\\)', | ||
lexems: IDENT_RE_RU, | ||
keywords: 'знач', | ||
contains: [STR_START, STR_CONT] | ||
}, | ||
{ | ||
className: 'export', | ||
begin: 'экспорт', endsWithParent: true, | ||
lexems: IDENT_RE_RU, | ||
keywords: 'экспорт', | ||
contains: [hljs.C_LINE_COMMENT_MODE] | ||
} | ||
] | ||
}, | ||
hljs.C_LINE_COMMENT_MODE | ||
] | ||
}, | ||
{className: 'preprocessor', begin: '#', end: '$'}, | ||
{className: 'date', begin: '\'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})\''} | ||
] | ||
}; | ||
}; |
@@ -13,69 +13,67 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: { | ||
keyword: 'as break case catch class const continue default delete do dynamic each ' + | ||
'else extends final finally for function get if implements import in include ' + | ||
'instanceof interface internal is namespace native new override package private ' + | ||
'protected public return set static super switch this throw try typeof use var void ' + | ||
'while with', | ||
literal: 'true false null undefined' | ||
keywords: { | ||
keyword: 'as break case catch class const continue default delete do dynamic each ' + | ||
'else extends final finally for function get if implements import in include ' + | ||
'instanceof interface internal is namespace native new override package private ' + | ||
'protected public return set static super switch this throw try typeof use var void ' + | ||
'while with', | ||
literal: 'true false null undefined' | ||
}, | ||
contains: [ | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'package', | ||
beginWithKeyword: true, end: '{', | ||
keywords: 'package', | ||
contains: [TITLE_MODE] | ||
}, | ||
contains: [ | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'package', | ||
beginWithKeyword: true, end: '{', | ||
keywords: 'package', | ||
contains: [TITLE_MODE] | ||
}, | ||
{ | ||
className: 'class', | ||
beginWithKeyword: true, end: '{', | ||
keywords: 'class interface', | ||
contains: [ | ||
{ | ||
beginWithKeyword: true, | ||
keywords: 'extends implements' | ||
}, | ||
TITLE_MODE | ||
] | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
beginWithKeyword: true, end: ';', | ||
keywords: 'import include' | ||
}, | ||
{ | ||
className: 'function', | ||
beginWithKeyword: true, end: '[{;]', | ||
keywords: 'function', | ||
illegal: '\\S', | ||
contains: [ | ||
TITLE_MODE, | ||
{ | ||
className: 'params', | ||
begin: '\\(', end: '\\)', | ||
contains: [ | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
AS3_REST_ARG_MODE | ||
] | ||
}, | ||
{ | ||
className: 'type', | ||
begin: ':', | ||
end: IDENT_FUNC_RETURN_TYPE_RE, | ||
relevance: 10 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
{ | ||
className: 'class', | ||
beginWithKeyword: true, end: '{', | ||
keywords: 'class interface', | ||
contains: [ | ||
{ | ||
beginWithKeyword: true, | ||
keywords: 'extends implements' | ||
}, | ||
TITLE_MODE | ||
] | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
beginWithKeyword: true, end: ';', | ||
keywords: 'import include' | ||
}, | ||
{ | ||
className: 'function', | ||
beginWithKeyword: true, end: '[{;]', | ||
keywords: 'function', | ||
illegal: '\\S', | ||
contains: [ | ||
TITLE_MODE, | ||
{ | ||
className: 'params', | ||
begin: '\\(', end: '\\)', | ||
contains: [ | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
AS3_REST_ARG_MODE | ||
] | ||
}, | ||
{ | ||
className: 'type', | ||
begin: ':', | ||
end: IDENT_FUNC_RETURN_TYPE_RE, | ||
relevance: 10 | ||
} | ||
] | ||
} | ||
] | ||
}; | ||
}; |
204
apache.js
@@ -5,107 +5,105 @@ module.exports = function(hljs) { | ||
case_insensitive: true, | ||
defaultMode: { | ||
keywords: { | ||
keyword: 'acceptfilter acceptmutex acceptpathinfo accessfilename action addalt ' + | ||
'addaltbyencoding addaltbytype addcharset adddefaultcharset adddescription ' + | ||
'addencoding addhandler addicon addiconbyencoding addiconbytype addinputfilter ' + | ||
'addlanguage addmoduleinfo addoutputfilter addoutputfilterbytype addtype alias ' + | ||
'aliasmatch allow allowconnect allowencodedslashes allowoverride anonymous ' + | ||
'anonymous_logemail anonymous_mustgiveemail anonymous_nouserid anonymous_verifyemail ' + | ||
'authbasicauthoritative authbasicprovider authdbduserpwquery authdbduserrealmquery ' + | ||
'authdbmgroupfile authdbmtype authdbmuserfile authdefaultauthoritative ' + | ||
'authdigestalgorithm authdigestdomain authdigestnccheck authdigestnonceformat ' + | ||
'authdigestnoncelifetime authdigestprovider authdigestqop authdigestshmemsize ' + | ||
'authgroupfile authldapbinddn authldapbindpassword authldapcharsetconfig ' + | ||
'authldapcomparednonserver authldapdereferencealiases authldapgroupattribute ' + | ||
'authldapgroupattributeisdn authldapremoteuserattribute authldapremoteuserisdn ' + | ||
'authldapurl authname authnprovideralias authtype authuserfile authzdbmauthoritative ' + | ||
'authzdbmtype authzdefaultauthoritative authzgroupfileauthoritative ' + | ||
'authzldapauthoritative authzownerauthoritative authzuserauthoritative ' + | ||
'balancermember browsermatch browsermatchnocase bufferedlogs cachedefaultexpire ' + | ||
'cachedirlength cachedirlevels cachedisable cacheenable cachefile ' + | ||
'cacheignorecachecontrol cacheignoreheaders cacheignorenolastmod ' + | ||
'cacheignorequerystring cachelastmodifiedfactor cachemaxexpire cachemaxfilesize ' + | ||
'cacheminfilesize cachenegotiateddocs cacheroot cachestorenostore cachestoreprivate ' + | ||
'cgimapextension charsetdefault charsetoptions charsetsourceenc checkcaseonly ' + | ||
'checkspelling chrootdir contentdigest cookiedomain cookieexpires cookielog ' + | ||
'cookiename cookiestyle cookietracking coredumpdirectory customlog dav ' + | ||
'davdepthinfinity davgenericlockdb davlockdb davmintimeout dbdexptime dbdkeep ' + | ||
'dbdmax dbdmin dbdparams dbdpersist dbdpreparesql dbdriver defaulticon ' + | ||
'defaultlanguage defaulttype deflatebuffersize deflatecompressionlevel ' + | ||
'deflatefilternote deflatememlevel deflatewindowsize deny directoryindex ' + | ||
'directorymatch directoryslash documentroot dumpioinput dumpiologlevel dumpiooutput ' + | ||
'enableexceptionhook enablemmap enablesendfile errordocument errorlog example ' + | ||
'expiresactive expiresbytype expiresdefault extendedstatus extfilterdefine ' + | ||
'extfilteroptions fileetag filterchain filterdeclare filterprotocol filterprovider ' + | ||
'filtertrace forcelanguagepriority forcetype forensiclog gracefulshutdowntimeout ' + | ||
'group header headername hostnamelookups identitycheck identitychecktimeout ' + | ||
'imapbase imapdefault imapmenu include indexheadinsert indexignore indexoptions ' + | ||
'indexorderdefault indexstylesheet isapiappendlogtoerrors isapiappendlogtoquery ' + | ||
'isapicachefile isapifakeasync isapilognotsupported isapireadaheadbuffer keepalive ' + | ||
'keepalivetimeout languagepriority ldapcacheentries ldapcachettl ' + | ||
'ldapconnectiontimeout ldapopcacheentries ldapopcachettl ldapsharedcachefile ' + | ||
'ldapsharedcachesize ldaptrustedclientcert ldaptrustedglobalcert ldaptrustedmode ' + | ||
'ldapverifyservercert limitinternalrecursion limitrequestbody limitrequestfields ' + | ||
'limitrequestfieldsize limitrequestline limitxmlrequestbody listen listenbacklog ' + | ||
'loadfile loadmodule lockfile logformat loglevel maxclients maxkeepaliverequests ' + | ||
'maxmemfree maxrequestsperchild maxrequestsperthread maxspareservers maxsparethreads ' + | ||
'maxthreads mcachemaxobjectcount mcachemaxobjectsize mcachemaxstreamingbuffer ' + | ||
'mcacheminobjectsize mcacheremovalalgorithm mcachesize metadir metafiles metasuffix ' + | ||
'mimemagicfile minspareservers minsparethreads mmapfile mod_gzip_on ' + | ||
'mod_gzip_add_header_count mod_gzip_keep_workfiles mod_gzip_dechunk ' + | ||
'mod_gzip_min_http mod_gzip_minimum_file_size mod_gzip_maximum_file_size ' + | ||
'mod_gzip_maximum_inmem_size mod_gzip_temp_dir mod_gzip_item_include ' + | ||
'mod_gzip_item_exclude mod_gzip_command_version mod_gzip_can_negotiate ' + | ||
'mod_gzip_handle_methods mod_gzip_static_suffix mod_gzip_send_vary ' + | ||
'mod_gzip_update_static modmimeusepathinfo multiviewsmatch namevirtualhost noproxy ' + | ||
'nwssltrustedcerts nwsslupgradeable options order passenv pidfile protocolecho ' + | ||
'proxybadheader proxyblock proxydomain proxyerroroverride proxyftpdircharset ' + | ||
'proxyiobuffersize proxymaxforwards proxypass proxypassinterpolateenv ' + | ||
'proxypassmatch proxypassreverse proxypassreversecookiedomain ' + | ||
'proxypassreversecookiepath proxypreservehost proxyreceivebuffersize proxyremote ' + | ||
'proxyremotematch proxyrequests proxyset proxystatus proxytimeout proxyvia ' + | ||
'readmename receivebuffersize redirect redirectmatch redirectpermanent ' + | ||
'redirecttemp removecharset removeencoding removehandler removeinputfilter ' + | ||
'removelanguage removeoutputfilter removetype requestheader require rewritebase ' + | ||
'rewritecond rewriteengine rewritelock rewritelog rewriteloglevel rewritemap ' + | ||
'rewriteoptions rewriterule rlimitcpu rlimitmem rlimitnproc satisfy scoreboardfile ' + | ||
'script scriptalias scriptaliasmatch scriptinterpretersource scriptlog ' + | ||
'scriptlogbuffer scriptloglength scriptsock securelisten seerequesttail ' + | ||
'sendbuffersize serveradmin serveralias serverlimit servername serverpath ' + | ||
'serverroot serversignature servertokens setenv setenvif setenvifnocase sethandler ' + | ||
'setinputfilter setoutputfilter ssienableaccess ssiendtag ssierrormsg ssistarttag ' + | ||
'ssitimeformat ssiundefinedecho sslcacertificatefile sslcacertificatepath ' + | ||
'sslcadnrequestfile sslcadnrequestpath sslcarevocationfile sslcarevocationpath ' + | ||
'sslcertificatechainfile sslcertificatefile sslcertificatekeyfile sslciphersuite ' + | ||
'sslcryptodevice sslengine sslhonorciperorder sslmutex ssloptions ' + | ||
'sslpassphrasedialog sslprotocol sslproxycacertificatefile ' + | ||
'sslproxycacertificatepath sslproxycarevocationfile sslproxycarevocationpath ' + | ||
'sslproxyciphersuite sslproxyengine sslproxymachinecertificatefile ' + | ||
'sslproxymachinecertificatepath sslproxyprotocol sslproxyverify ' + | ||
'sslproxyverifydepth sslrandomseed sslrequire sslrequiressl sslsessioncache ' + | ||
'sslsessioncachetimeout sslusername sslverifyclient sslverifydepth startservers ' + | ||
'startthreads substitute suexecusergroup threadlimit threadsperchild ' + | ||
'threadstacksize timeout traceenable transferlog typesconfig unsetenv ' + | ||
'usecanonicalname usecanonicalphysicalport user userdir virtualdocumentroot ' + | ||
'virtualdocumentrootip virtualscriptalias virtualscriptaliasip ' + | ||
'win32disableacceptex xbithack', | ||
literal: 'on off' | ||
keywords: { | ||
keyword: 'acceptfilter acceptmutex acceptpathinfo accessfilename action addalt ' + | ||
'addaltbyencoding addaltbytype addcharset adddefaultcharset adddescription ' + | ||
'addencoding addhandler addicon addiconbyencoding addiconbytype addinputfilter ' + | ||
'addlanguage addmoduleinfo addoutputfilter addoutputfilterbytype addtype alias ' + | ||
'aliasmatch allow allowconnect allowencodedslashes allowoverride anonymous ' + | ||
'anonymous_logemail anonymous_mustgiveemail anonymous_nouserid anonymous_verifyemail ' + | ||
'authbasicauthoritative authbasicprovider authdbduserpwquery authdbduserrealmquery ' + | ||
'authdbmgroupfile authdbmtype authdbmuserfile authdefaultauthoritative ' + | ||
'authdigestalgorithm authdigestdomain authdigestnccheck authdigestnonceformat ' + | ||
'authdigestnoncelifetime authdigestprovider authdigestqop authdigestshmemsize ' + | ||
'authgroupfile authldapbinddn authldapbindpassword authldapcharsetconfig ' + | ||
'authldapcomparednonserver authldapdereferencealiases authldapgroupattribute ' + | ||
'authldapgroupattributeisdn authldapremoteuserattribute authldapremoteuserisdn ' + | ||
'authldapurl authname authnprovideralias authtype authuserfile authzdbmauthoritative ' + | ||
'authzdbmtype authzdefaultauthoritative authzgroupfileauthoritative ' + | ||
'authzldapauthoritative authzownerauthoritative authzuserauthoritative ' + | ||
'balancermember browsermatch browsermatchnocase bufferedlogs cachedefaultexpire ' + | ||
'cachedirlength cachedirlevels cachedisable cacheenable cachefile ' + | ||
'cacheignorecachecontrol cacheignoreheaders cacheignorenolastmod ' + | ||
'cacheignorequerystring cachelastmodifiedfactor cachemaxexpire cachemaxfilesize ' + | ||
'cacheminfilesize cachenegotiateddocs cacheroot cachestorenostore cachestoreprivate ' + | ||
'cgimapextension charsetdefault charsetoptions charsetsourceenc checkcaseonly ' + | ||
'checkspelling chrootdir contentdigest cookiedomain cookieexpires cookielog ' + | ||
'cookiename cookiestyle cookietracking coredumpdirectory customlog dav ' + | ||
'davdepthinfinity davgenericlockdb davlockdb davmintimeout dbdexptime dbdkeep ' + | ||
'dbdmax dbdmin dbdparams dbdpersist dbdpreparesql dbdriver defaulticon ' + | ||
'defaultlanguage defaulttype deflatebuffersize deflatecompressionlevel ' + | ||
'deflatefilternote deflatememlevel deflatewindowsize deny directoryindex ' + | ||
'directorymatch directoryslash documentroot dumpioinput dumpiologlevel dumpiooutput ' + | ||
'enableexceptionhook enablemmap enablesendfile errordocument errorlog example ' + | ||
'expiresactive expiresbytype expiresdefault extendedstatus extfilterdefine ' + | ||
'extfilteroptions fileetag filterchain filterdeclare filterprotocol filterprovider ' + | ||
'filtertrace forcelanguagepriority forcetype forensiclog gracefulshutdowntimeout ' + | ||
'group header headername hostnamelookups identitycheck identitychecktimeout ' + | ||
'imapbase imapdefault imapmenu include indexheadinsert indexignore indexoptions ' + | ||
'indexorderdefault indexstylesheet isapiappendlogtoerrors isapiappendlogtoquery ' + | ||
'isapicachefile isapifakeasync isapilognotsupported isapireadaheadbuffer keepalive ' + | ||
'keepalivetimeout languagepriority ldapcacheentries ldapcachettl ' + | ||
'ldapconnectiontimeout ldapopcacheentries ldapopcachettl ldapsharedcachefile ' + | ||
'ldapsharedcachesize ldaptrustedclientcert ldaptrustedglobalcert ldaptrustedmode ' + | ||
'ldapverifyservercert limitinternalrecursion limitrequestbody limitrequestfields ' + | ||
'limitrequestfieldsize limitrequestline limitxmlrequestbody listen listenbacklog ' + | ||
'loadfile loadmodule lockfile logformat loglevel maxclients maxkeepaliverequests ' + | ||
'maxmemfree maxrequestsperchild maxrequestsperthread maxspareservers maxsparethreads ' + | ||
'maxthreads mcachemaxobjectcount mcachemaxobjectsize mcachemaxstreamingbuffer ' + | ||
'mcacheminobjectsize mcacheremovalalgorithm mcachesize metadir metafiles metasuffix ' + | ||
'mimemagicfile minspareservers minsparethreads mmapfile mod_gzip_on ' + | ||
'mod_gzip_add_header_count mod_gzip_keep_workfiles mod_gzip_dechunk ' + | ||
'mod_gzip_min_http mod_gzip_minimum_file_size mod_gzip_maximum_file_size ' + | ||
'mod_gzip_maximum_inmem_size mod_gzip_temp_dir mod_gzip_item_include ' + | ||
'mod_gzip_item_exclude mod_gzip_command_version mod_gzip_can_negotiate ' + | ||
'mod_gzip_handle_methods mod_gzip_static_suffix mod_gzip_send_vary ' + | ||
'mod_gzip_update_static modmimeusepathinfo multiviewsmatch namevirtualhost noproxy ' + | ||
'nwssltrustedcerts nwsslupgradeable options order passenv pidfile protocolecho ' + | ||
'proxybadheader proxyblock proxydomain proxyerroroverride proxyftpdircharset ' + | ||
'proxyiobuffersize proxymaxforwards proxypass proxypassinterpolateenv ' + | ||
'proxypassmatch proxypassreverse proxypassreversecookiedomain ' + | ||
'proxypassreversecookiepath proxypreservehost proxyreceivebuffersize proxyremote ' + | ||
'proxyremotematch proxyrequests proxyset proxystatus proxytimeout proxyvia ' + | ||
'readmename receivebuffersize redirect redirectmatch redirectpermanent ' + | ||
'redirecttemp removecharset removeencoding removehandler removeinputfilter ' + | ||
'removelanguage removeoutputfilter removetype requestheader require rewritebase ' + | ||
'rewritecond rewriteengine rewritelock rewritelog rewriteloglevel rewritemap ' + | ||
'rewriteoptions rewriterule rlimitcpu rlimitmem rlimitnproc satisfy scoreboardfile ' + | ||
'script scriptalias scriptaliasmatch scriptinterpretersource scriptlog ' + | ||
'scriptlogbuffer scriptloglength scriptsock securelisten seerequesttail ' + | ||
'sendbuffersize serveradmin serveralias serverlimit servername serverpath ' + | ||
'serverroot serversignature servertokens setenv setenvif setenvifnocase sethandler ' + | ||
'setinputfilter setoutputfilter ssienableaccess ssiendtag ssierrormsg ssistarttag ' + | ||
'ssitimeformat ssiundefinedecho sslcacertificatefile sslcacertificatepath ' + | ||
'sslcadnrequestfile sslcadnrequestpath sslcarevocationfile sslcarevocationpath ' + | ||
'sslcertificatechainfile sslcertificatefile sslcertificatekeyfile sslciphersuite ' + | ||
'sslcryptodevice sslengine sslhonorciperorder sslmutex ssloptions ' + | ||
'sslpassphrasedialog sslprotocol sslproxycacertificatefile ' + | ||
'sslproxycacertificatepath sslproxycarevocationfile sslproxycarevocationpath ' + | ||
'sslproxyciphersuite sslproxyengine sslproxymachinecertificatefile ' + | ||
'sslproxymachinecertificatepath sslproxyprotocol sslproxyverify ' + | ||
'sslproxyverifydepth sslrandomseed sslrequire sslrequiressl sslsessioncache ' + | ||
'sslsessioncachetimeout sslusername sslverifyclient sslverifydepth startservers ' + | ||
'startthreads substitute suexecusergroup threadlimit threadsperchild ' + | ||
'threadstacksize timeout traceenable transferlog typesconfig unsetenv ' + | ||
'usecanonicalname usecanonicalphysicalport user userdir virtualdocumentroot ' + | ||
'virtualdocumentrootip virtualscriptalias virtualscriptaliasip ' + | ||
'win32disableacceptex xbithack', | ||
literal: 'on off' | ||
}, | ||
contains: [ | ||
hljs.HASH_COMMENT_MODE, | ||
{ | ||
className: 'sqbracket', | ||
begin: '\\s\\[', end: '\\]$' | ||
}, | ||
contains: [ | ||
hljs.HASH_COMMENT_MODE, | ||
{ | ||
className: 'sqbracket', | ||
begin: '\\s\\[', end: '\\]$' | ||
}, | ||
{ | ||
className: 'cbracket', | ||
begin: '[\\$%]\\{', end: '\\}', | ||
contains: ['self', NUMBER] | ||
}, | ||
NUMBER, | ||
{className: 'tag', begin: '</?', end: '>'}, | ||
hljs.QUOTE_STRING_MODE | ||
] | ||
} | ||
{ | ||
className: 'cbracket', | ||
begin: '[\\$%]\\{', end: '\\}', | ||
contains: ['self', NUMBER] | ||
}, | ||
NUMBER, | ||
{className: 'tag', begin: '</?', end: '>'}, | ||
hljs.QUOTE_STRING_MODE | ||
] | ||
}; | ||
}; |
100
avrasm.js
module.exports = function(hljs) { | ||
return { | ||
case_insensitive: true, | ||
defaultMode: { | ||
keywords: { | ||
keyword: | ||
/* mnemonic */ | ||
'adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs ' + | ||
'brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr ' + | ||
'clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor ' + | ||
'fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul ' + | ||
'muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs ' + | ||
'sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub ' + | ||
'subi swap tst wdr', | ||
built_in: | ||
/* general purpose registers */ | ||
'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 ' + | ||
'r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ' + | ||
/* IO Registers (ATMega128) */ | ||
'ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h ' + | ||
'tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ' + | ||
'ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ' + | ||
'ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk ' + | ||
'tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ' + | ||
'ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr ' + | ||
'porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ' + | ||
'ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf' | ||
keywords: { | ||
keyword: | ||
/* mnemonic */ | ||
'adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs ' + | ||
'brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr ' + | ||
'clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor ' + | ||
'fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul ' + | ||
'muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs ' + | ||
'sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub ' + | ||
'subi swap tst wdr', | ||
built_in: | ||
/* general purpose registers */ | ||
'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 ' + | ||
'r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ' + | ||
/* IO Registers (ATMega128) */ | ||
'ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h ' + | ||
'tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ' + | ||
'ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ' + | ||
'ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk ' + | ||
'tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ' + | ||
'ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr ' + | ||
'porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ' + | ||
'ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf' | ||
}, | ||
contains: [ | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{className: 'comment', begin: ';', end: '$'}, | ||
hljs.C_NUMBER_MODE, // 0x..., decimal, float | ||
hljs.BINARY_NUMBER_MODE, // 0b... | ||
{ | ||
className: 'number', | ||
begin: '\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)' // $..., 0o... | ||
}, | ||
contains: [ | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{className: 'comment', begin: ';', end: '$'}, | ||
hljs.C_NUMBER_MODE, // 0x..., decimal, float | ||
hljs.BINARY_NUMBER_MODE, // 0b... | ||
{ | ||
className: 'number', | ||
begin: '\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)' // $..., 0o... | ||
}, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'string', | ||
begin: '\'', end: '[^\\\\]\'', | ||
illegal: '[^\\\\][^\']' | ||
}, | ||
{className: 'label', begin: '^[A-Za-z0-9_.$]+:'}, | ||
{className: 'preprocessor', begin: '#', end: '$'}, | ||
{ // директивы «.include» «.macro» и т.д. | ||
className: 'preprocessor', | ||
begin: '\\.[a-zA-Z]+' | ||
}, | ||
{ // подстановка в «.macro» | ||
className: 'localvars', | ||
begin: '@[0-9]+' | ||
} | ||
] | ||
} | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'string', | ||
begin: '\'', end: '[^\\\\]\'', | ||
illegal: '[^\\\\][^\']' | ||
}, | ||
{className: 'label', begin: '^[A-Za-z0-9_.$]+:'}, | ||
{className: 'preprocessor', begin: '#', end: '$'}, | ||
{ // директивы «.include» «.macro» и т.д. | ||
className: 'preprocessor', | ||
begin: '\\.[a-zA-Z]+' | ||
}, | ||
{ // подстановка в «.macro» | ||
className: 'localvars', | ||
begin: '@[0-9]+' | ||
} | ||
] | ||
}; | ||
}; |
module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: 'false int abstract private char interface boolean static null if for true ' + | ||
'while long throw finally protected extends final implements return void enum else ' + | ||
'break new catch byte super class case short default double public try this switch ' + | ||
'continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count ' + | ||
'order group by asc desc index hint like dispaly edit client server ttsbegin ' + | ||
'ttscommit str real date container anytype common div mod', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#', end: '$' | ||
}, | ||
{ | ||
className: 'class', | ||
beginWithKeyword: true, end: '{', | ||
illegal: ':', | ||
keywords: 'class interface', | ||
contains: [ | ||
{ | ||
className: 'inheritance', | ||
beginWithKeyword: true, | ||
keywords: 'extends implements', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE | ||
} | ||
] | ||
} | ||
] | ||
} | ||
keywords: 'false int abstract private char interface boolean static null if for true ' + | ||
'while long throw finally protected extends final implements return void enum else ' + | ||
'break new catch byte super class case short default double public try this switch ' + | ||
'continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count ' + | ||
'order group by asc desc index hint like dispaly edit client server ttsbegin ' + | ||
'ttscommit str real date container anytype common div mod', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#', end: '$' | ||
}, | ||
{ | ||
className: 'class', | ||
beginWithKeyword: true, end: '{', | ||
illegal: ':', | ||
keywords: 'class interface', | ||
contains: [ | ||
{ | ||
className: 'inheritance', | ||
beginWithKeyword: true, | ||
keywords: 'extends implements', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE | ||
} | ||
] | ||
} | ||
] | ||
}; | ||
}; |
36
bash.js
@@ -33,23 +33,21 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: { | ||
keyword: 'if then else fi for break continue while in do done echo exit return set declare', | ||
literal: BASH_LITERAL | ||
keywords: { | ||
keyword: 'if then else fi for break continue while in do done echo exit return set declare', | ||
literal: BASH_LITERAL | ||
}, | ||
contains: [ | ||
{ | ||
className: 'shebang', | ||
begin: '(#!\\/bin\\/bash)|(#!\\/bin\\/sh)', | ||
relevance: 10 | ||
}, | ||
contains: [ | ||
{ | ||
className: 'shebang', | ||
begin: '(#!\\/bin\\/bash)|(#!\\/bin\\/sh)', | ||
relevance: 10 | ||
}, | ||
VAR1, | ||
VAR2, | ||
hljs.HASH_COMMENT_MODE, | ||
QUOTE_STRING, | ||
APOS_STRING, | ||
hljs.inherit(TEST_CONDITION, {begin: '\\[ ', end: ' \\]', relevance: 0}), | ||
hljs.inherit(TEST_CONDITION, {begin: '\\[\\[ ', end: ' \\]\\]'}) | ||
] | ||
} | ||
VAR1, | ||
VAR2, | ||
hljs.HASH_COMMENT_MODE, | ||
QUOTE_STRING, | ||
APOS_STRING, | ||
hljs.inherit(TEST_CONDITION, {begin: '\\[ ', end: ' \\]', relevance: 0}), | ||
hljs.inherit(TEST_CONDITION, {begin: '\\[\\[ ', end: ' \\]\\]'}) | ||
] | ||
}; | ||
}; |
@@ -91,10 +91,8 @@ module.exports = function(hljs) { | ||
case_insensitive: true, | ||
defaultMode: { | ||
illegal: '\\S', | ||
contains: [ | ||
COMMENT, | ||
LIST | ||
] | ||
} | ||
illegal: '\\S', | ||
contains: [ | ||
COMMENT, | ||
LIST | ||
] | ||
} | ||
}; |
54
cmake.js
module.exports = function(hljs) { | ||
return { | ||
case_insensitive: true, | ||
defaultMode: { | ||
keywords: 'add_custom_command add_custom_target add_definitions add_dependencies ' + | ||
'add_executable add_library add_subdirectory add_test aux_source_directory ' + | ||
'break build_command cmake_minimum_required cmake_policy configure_file ' + | ||
'create_test_sourcelist define_property else elseif enable_language enable_testing ' + | ||
'endforeach endfunction endif endmacro endwhile execute_process export find_file ' + | ||
'find_library find_package find_path find_program fltk_wrap_ui foreach function ' + | ||
'get_cmake_property get_directory_property get_filename_component get_property ' + | ||
'get_source_file_property get_target_property get_test_property if include ' + | ||
'include_directories include_external_msproject include_regular_expression install ' + | ||
'link_directories load_cache load_command macro mark_as_advanced message option ' + | ||
'output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return ' + | ||
'separate_arguments set set_directory_properties set_property ' + | ||
'set_source_files_properties set_target_properties set_tests_properties site_name ' + | ||
'source_group string target_link_libraries try_compile try_run unset variable_watch ' + | ||
'while build_name exec_program export_library_dependencies install_files ' + | ||
'install_programs install_targets link_libraries make_directory remove subdir_depends ' + | ||
'subdirs use_mangled_mesa utility_source variable_requires write_file', | ||
contains: [ | ||
{ | ||
className: 'envvar', | ||
begin: '\\${', end: '}' | ||
}, | ||
hljs.HASH_COMMENT_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.NUMBER_MODE | ||
] | ||
} | ||
keywords: 'add_custom_command add_custom_target add_definitions add_dependencies ' + | ||
'add_executable add_library add_subdirectory add_test aux_source_directory ' + | ||
'break build_command cmake_minimum_required cmake_policy configure_file ' + | ||
'create_test_sourcelist define_property else elseif enable_language enable_testing ' + | ||
'endforeach endfunction endif endmacro endwhile execute_process export find_file ' + | ||
'find_library find_package find_path find_program fltk_wrap_ui foreach function ' + | ||
'get_cmake_property get_directory_property get_filename_component get_property ' + | ||
'get_source_file_property get_target_property get_test_property if include ' + | ||
'include_directories include_external_msproject include_regular_expression install ' + | ||
'link_directories load_cache load_command macro mark_as_advanced message option ' + | ||
'output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return ' + | ||
'separate_arguments set set_directory_properties set_property ' + | ||
'set_source_files_properties set_target_properties set_tests_properties site_name ' + | ||
'source_group string target_link_libraries try_compile try_run unset variable_watch ' + | ||
'while build_name exec_program export_library_dependencies install_files ' + | ||
'install_programs install_targets link_libraries make_directory remove subdir_depends ' + | ||
'subdirs use_mangled_mesa utility_source variable_requires write_file', | ||
contains: [ | ||
{ | ||
className: 'envvar', | ||
begin: '\\${', end: '}' | ||
}, | ||
hljs.HASH_COMMENT_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.NUMBER_MODE | ||
] | ||
}; | ||
}; |
@@ -83,24 +83,22 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: keywords, | ||
contains: [ | ||
// Numbers | ||
hljs.C_NUMBER_MODE, | ||
hljs.BINARY_NUMBER_MODE, | ||
// Strings | ||
hljs.APOS_STRING_MODE, | ||
COFFEE_HEREDOC_MODE, // Should be before COFFEE_QUOTE_STRING_MODE for greater priority | ||
COFFEE_QUOTE_STRING_MODE, | ||
// Comments | ||
COFFEE_HERECOMMENT_MODE, // Should be before hljs.HASH_COMMENT_MODE for greater priority | ||
hljs.HASH_COMMENT_MODE, | ||
// CoffeeScript specific modes | ||
COFFEE_HEREGEX_MODE, | ||
COFFEE_EMPTY_REGEX_MODE, | ||
COFFEE_REGEX_MODE, | ||
COFFEE_EMBEDDED_JAVASCRIPT, | ||
COFFEE_FUNCTION_DECLARATION_MODE | ||
] | ||
} | ||
keywords: keywords, | ||
contains: [ | ||
// Numbers | ||
hljs.C_NUMBER_MODE, | ||
hljs.BINARY_NUMBER_MODE, | ||
// Strings | ||
hljs.APOS_STRING_MODE, | ||
COFFEE_HEREDOC_MODE, // Should be before COFFEE_QUOTE_STRING_MODE for greater priority | ||
COFFEE_QUOTE_STRING_MODE, | ||
// Comments | ||
COFFEE_HERECOMMENT_MODE, // Should be before hljs.HASH_COMMENT_MODE for greater priority | ||
hljs.HASH_COMMENT_MODE, | ||
// CoffeeScript specific modes | ||
COFFEE_HEREGEX_MODE, | ||
COFFEE_EMPTY_REGEX_MODE, | ||
COFFEE_REGEX_MODE, | ||
COFFEE_EMBEDDED_JAVASCRIPT, | ||
COFFEE_FUNCTION_DECLARATION_MODE | ||
] | ||
}; | ||
}; |
58
cpp.js
@@ -15,33 +15,31 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: CPP_KEYWORDS, | ||
illegal: '</', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'string', | ||
begin: '\'\\\\?.', end: '\'', | ||
illegal: '.' | ||
}, | ||
{ | ||
className: 'number', | ||
begin: '\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)' | ||
}, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#', end: '$' | ||
}, | ||
{ | ||
className: 'stl_container', | ||
begin: '\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<', end: '>', | ||
keywords: CPP_KEYWORDS, | ||
relevance: 10, | ||
contains: ['self'] | ||
} | ||
] | ||
} | ||
keywords: CPP_KEYWORDS, | ||
illegal: '</', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'string', | ||
begin: '\'\\\\?.', end: '\'', | ||
illegal: '.' | ||
}, | ||
{ | ||
className: 'number', | ||
begin: '\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)' | ||
}, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#', end: '$' | ||
}, | ||
{ | ||
className: 'stl_container', | ||
begin: '\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<', end: '>', | ||
keywords: CPP_KEYWORDS, | ||
relevance: 10, | ||
contains: ['self'] | ||
} | ||
] | ||
}; | ||
}; |
86
cs.js
module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: | ||
// Normal keywords. | ||
'abstract as base bool break byte case catch char checked class const continue decimal ' + | ||
'default delegate do double else enum event explicit extern false finally fixed float ' + | ||
'for foreach goto if implicit in int interface internal is lock long namespace new null ' + | ||
'object operator out override params private protected public readonly ref return sbyte ' + | ||
'sealed short sizeof stackalloc static string struct switch this throw true try typeof ' + | ||
'uint ulong unchecked unsafe ushort using virtual volatile void while ' + | ||
// Contextual keywords. | ||
'ascending descending from get group into join let orderby partial select set value var '+ | ||
'where yield', | ||
contains: [ | ||
{ | ||
className: 'comment', | ||
begin: '///', end: '$', returnBegin: true, | ||
contains: [ | ||
{ | ||
className: 'xmlDocTag', | ||
begin: '///|<!--|-->' | ||
}, | ||
{ | ||
className: 'xmlDocTag', | ||
begin: '</?', end: '>' | ||
} | ||
] | ||
}, | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#', end: '$', | ||
keywords: 'if else elif endif define undef warning error line region endregion pragma checksum' | ||
}, | ||
{ | ||
className: 'string', | ||
begin: '@"', end: '"', | ||
contains: [{begin: '""'}] | ||
}, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.C_NUMBER_MODE | ||
] | ||
} | ||
keywords: | ||
// Normal keywords. | ||
'abstract as base bool break byte case catch char checked class const continue decimal ' + | ||
'default delegate do double else enum event explicit extern false finally fixed float ' + | ||
'for foreach goto if implicit in int interface internal is lock long namespace new null ' + | ||
'object operator out override params private protected public readonly ref return sbyte ' + | ||
'sealed short sizeof stackalloc static string struct switch this throw true try typeof ' + | ||
'uint ulong unchecked unsafe ushort using virtual volatile void while ' + | ||
// Contextual keywords. | ||
'ascending descending from get group into join let orderby partial select set value var '+ | ||
'where yield', | ||
contains: [ | ||
{ | ||
className: 'comment', | ||
begin: '///', end: '$', returnBegin: true, | ||
contains: [ | ||
{ | ||
className: 'xmlDocTag', | ||
begin: '///|<!--|-->' | ||
}, | ||
{ | ||
className: 'xmlDocTag', | ||
begin: '</?', end: '>' | ||
} | ||
] | ||
}, | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#', end: '$', | ||
keywords: 'if else elif endif define undef warning error line region endregion pragma checksum' | ||
}, | ||
{ | ||
className: 'string', | ||
begin: '@"', end: '"', | ||
contains: [{begin: '""'}] | ||
}, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.C_NUMBER_MODE | ||
] | ||
}; | ||
}; |
164
css.js
@@ -9,87 +9,85 @@ module.exports = function(hljs) { | ||
case_insensitive: true, | ||
defaultMode: { | ||
illegal: '[=/|\']', | ||
contains: [ | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{ | ||
className: 'id', begin: '\\#[A-Za-z0-9_-]+' | ||
}, | ||
{ | ||
className: 'class', begin: '\\.[A-Za-z0-9_-]+', | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'attr_selector', | ||
begin: '\\[', end: '\\]', | ||
illegal: '$' | ||
}, | ||
{ | ||
className: 'pseudo', | ||
begin: ':(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\"\\\']+' | ||
}, | ||
{ | ||
className: 'at_rule', | ||
begin: '@(font-face|page)', | ||
lexems: '[a-z-]+', | ||
keywords: 'font-face page' | ||
}, | ||
{ | ||
className: 'at_rule', | ||
begin: '@', end: '[{;]', // at_rule eating first "{" is a good thing | ||
// because it doesn’t let it to be parsed as | ||
// a rule set but instead drops parser into | ||
// the defaultMode which is how it should be. | ||
excludeEnd: true, | ||
keywords: 'import page media charset', | ||
contains: [ | ||
FUNCTION, | ||
hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, | ||
hljs.NUMBER_MODE | ||
] | ||
}, | ||
{ | ||
className: 'tag', begin: hljs.IDENT_RE, | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'rules', | ||
begin: '{', end: '}', | ||
illegal: '[^\\s]', | ||
relevance: 0, | ||
contains: [ | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{ | ||
className: 'rule', | ||
begin: '[^\\s]', returnBegin: true, end: ';', endsWithParent: true, | ||
contains: [ | ||
{ | ||
className: 'attribute', | ||
begin: '[A-Z\\_\\.\\-]+', end: ':', | ||
excludeEnd: true, | ||
illegal: '[^\\s]', | ||
starts: { | ||
className: 'value', | ||
endsWithParent: true, excludeEnd: true, | ||
contains: [ | ||
FUNCTION, | ||
hljs.NUMBER_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.APOS_STRING_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{ | ||
className: 'hexcolor', begin: '\\#[0-9A-F]+' | ||
}, | ||
{ | ||
className: 'important', begin: '!important' | ||
} | ||
] | ||
} | ||
illegal: '[=/|\']', | ||
contains: [ | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{ | ||
className: 'id', begin: '\\#[A-Za-z0-9_-]+' | ||
}, | ||
{ | ||
className: 'class', begin: '\\.[A-Za-z0-9_-]+', | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'attr_selector', | ||
begin: '\\[', end: '\\]', | ||
illegal: '$' | ||
}, | ||
{ | ||
className: 'pseudo', | ||
begin: ':(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\"\\\']+' | ||
}, | ||
{ | ||
className: 'at_rule', | ||
begin: '@(font-face|page)', | ||
lexems: '[a-z-]+', | ||
keywords: 'font-face page' | ||
}, | ||
{ | ||
className: 'at_rule', | ||
begin: '@', end: '[{;]', // at_rule eating first "{" is a good thing | ||
// because it doesn’t let it to be parsed as | ||
// a rule set but instead drops parser into | ||
// the default mode which is how it should be. | ||
excludeEnd: true, | ||
keywords: 'import page media charset', | ||
contains: [ | ||
FUNCTION, | ||
hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, | ||
hljs.NUMBER_MODE | ||
] | ||
}, | ||
{ | ||
className: 'tag', begin: hljs.IDENT_RE, | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'rules', | ||
begin: '{', end: '}', | ||
illegal: '[^\\s]', | ||
relevance: 0, | ||
contains: [ | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{ | ||
className: 'rule', | ||
begin: '[^\\s]', returnBegin: true, end: ';', endsWithParent: true, | ||
contains: [ | ||
{ | ||
className: 'attribute', | ||
begin: '[A-Z\\_\\.\\-]+', end: ':', | ||
excludeEnd: true, | ||
illegal: '[^\\s]', | ||
starts: { | ||
className: 'value', | ||
endsWithParent: true, excludeEnd: true, | ||
contains: [ | ||
FUNCTION, | ||
hljs.NUMBER_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.APOS_STRING_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{ | ||
className: 'hexcolor', begin: '\\#[0-9A-F]+' | ||
}, | ||
{ | ||
className: 'important', begin: '!important' | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}; | ||
}; |
40
d.js
@@ -61,3 +61,3 @@ module.exports = /** | ||
'\\.?' + hexadecimal_digits_re + | ||
')[pP][+-]?' + decimal_integer_nosus_re + ')'; | ||
')[pP][+-]?' + decimal_integer_nosus_re + ')', | ||
@@ -241,23 +241,21 @@ integer_re = '(' + | ||
return { | ||
defaultMode: { | ||
lexems: hljs.UNDERSCORE_IDENT_RE, | ||
keywords: D_KEYWORDS, | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
D_NESTING_COMMENT_MODE, | ||
D_HEX_STRING_MODE, | ||
D_STRING_MODE, | ||
D_WYSIWYG_DELIMITED_STRING_MODE, | ||
D_ALTERNATE_WYSIWYG_STRING_MODE, | ||
D_TOKEN_STRING_MODE, | ||
D_FLOAT_MODE, | ||
D_INTEGER_MODE, | ||
D_CHARACTER_MODE, | ||
D_HASHBANG_MODE, | ||
D_SPECIAL_TOKEN_SEQUENCE_MODE, | ||
D_ATTRIBUTE_MODE | ||
] | ||
} | ||
lexems: hljs.UNDERSCORE_IDENT_RE, | ||
keywords: D_KEYWORDS, | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
D_NESTING_COMMENT_MODE, | ||
D_HEX_STRING_MODE, | ||
D_STRING_MODE, | ||
D_WYSIWYG_DELIMITED_STRING_MODE, | ||
D_ALTERNATE_WYSIWYG_STRING_MODE, | ||
D_TOKEN_STRING_MODE, | ||
D_FLOAT_MODE, | ||
D_INTEGER_MODE, | ||
D_CHARACTER_MODE, | ||
D_HASHBANG_MODE, | ||
D_SPECIAL_TOKEN_SEQUENCE_MODE, | ||
D_ATTRIBUTE_MODE | ||
] | ||
}; | ||
}; |
@@ -54,23 +54,21 @@ module.exports = function(hljs) { | ||
case_insensitive: true, | ||
defaultMode: { | ||
keywords: DELPHI_KEYWORDS, | ||
illegal: '("|\\$[G-Zg-z]|\\/\\*|</)', | ||
contains: [ | ||
CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE, | ||
STRING, CHAR_STRING, | ||
hljs.NUMBER_MODE, | ||
FUNCTION, | ||
{ | ||
className: 'class', | ||
begin: '=\\bclass\\b', end: 'end;', | ||
keywords: DELPHI_CLASS_KEYWORDS, | ||
contains: [ | ||
STRING, CHAR_STRING, | ||
CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE, | ||
FUNCTION | ||
] | ||
} | ||
] | ||
} | ||
keywords: DELPHI_KEYWORDS, | ||
illegal: '("|\\$[G-Zg-z]|\\/\\*|</)', | ||
contains: [ | ||
CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE, | ||
STRING, CHAR_STRING, | ||
hljs.NUMBER_MODE, | ||
FUNCTION, | ||
{ | ||
className: 'class', | ||
begin: '=\\bclass\\b', end: 'end;', | ||
keywords: DELPHI_CLASS_KEYWORDS, | ||
contains: [ | ||
STRING, CHAR_STRING, | ||
CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE, | ||
FUNCTION | ||
] | ||
} | ||
] | ||
}; | ||
}; |
108
diff.js
module.exports = function(hljs) { | ||
return { | ||
case_insensitive: true, | ||
defaultMode: { | ||
contains: [ | ||
{ | ||
className: 'chunk', | ||
begin: '^\\@\\@ +\\-\\d+,\\d+ +\\+\\d+,\\d+ +\\@\\@$', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'chunk', | ||
begin: '^\\*\\*\\* +\\d+,\\d+ +\\*\\*\\*\\*$', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'chunk', | ||
begin: '^\\-\\-\\- +\\d+,\\d+ +\\-\\-\\-\\-$', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'header', | ||
begin: 'Index: ', end: '$' | ||
}, | ||
{ | ||
className: 'header', | ||
begin: '=====', end: '=====$' | ||
}, | ||
{ | ||
className: 'header', | ||
begin: '^\\-\\-\\-', end: '$' | ||
}, | ||
{ | ||
className: 'header', | ||
begin: '^\\*{3} ', end: '$' | ||
}, | ||
{ | ||
className: 'header', | ||
begin: '^\\+\\+\\+', end: '$' | ||
}, | ||
{ | ||
className: 'header', | ||
begin: '\\*{5}', end: '\\*{5}$' | ||
}, | ||
{ | ||
className: 'addition', | ||
begin: '^\\+', end: '$' | ||
}, | ||
{ | ||
className: 'deletion', | ||
begin: '^\\-', end: '$' | ||
}, | ||
{ | ||
className: 'change', | ||
begin: '^\\!', end: '$' | ||
} | ||
] | ||
} | ||
contains: [ | ||
{ | ||
className: 'chunk', | ||
begin: '^\\@\\@ +\\-\\d+,\\d+ +\\+\\d+,\\d+ +\\@\\@$', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'chunk', | ||
begin: '^\\*\\*\\* +\\d+,\\d+ +\\*\\*\\*\\*$', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'chunk', | ||
begin: '^\\-\\-\\- +\\d+,\\d+ +\\-\\-\\-\\-$', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'header', | ||
begin: 'Index: ', end: '$' | ||
}, | ||
{ | ||
className: 'header', | ||
begin: '=====', end: '=====$' | ||
}, | ||
{ | ||
className: 'header', | ||
begin: '^\\-\\-\\-', end: '$' | ||
}, | ||
{ | ||
className: 'header', | ||
begin: '^\\*{3} ', end: '$' | ||
}, | ||
{ | ||
className: 'header', | ||
begin: '^\\+\\+\\+', end: '$' | ||
}, | ||
{ | ||
className: 'header', | ||
begin: '\\*{5}', end: '\\*{5}$' | ||
}, | ||
{ | ||
className: 'addition', | ||
begin: '^\\+', end: '$' | ||
}, | ||
{ | ||
className: 'deletion', | ||
begin: '^\\-', end: '$' | ||
}, | ||
{ | ||
className: 'change', | ||
begin: '^\\!', end: '$' | ||
} | ||
] | ||
}; | ||
}; |
@@ -5,3 +5,3 @@ module.exports = function(hljs) { | ||
return ( | ||
parent == undefined || // defaultMode | ||
parent == undefined || // default mode | ||
(!mode.className && parent.className == 'tag') || // tag_internal | ||
@@ -79,7 +79,5 @@ mode.className == 'value' // value | ||
return { | ||
case_insensitive: true, | ||
defaultMode: copy(hljs.LANGUAGES.xml.defaultMode) | ||
}; | ||
var result = copy(hljs.LANGUAGES.xml); | ||
result.case_insensitive = true; | ||
return result; | ||
}; |
50
dos.js
module.exports = function(hljs) { | ||
return { | ||
case_insensitive: true, | ||
defaultMode: { | ||
keywords: { | ||
flow: 'if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq', | ||
keyword: 'shift cd dir echo setlocal endlocal set pause copy', | ||
stream: 'prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux', | ||
winutils: 'ping net ipconfig taskkill xcopy ren del' | ||
keywords: { | ||
flow: 'if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq', | ||
keyword: 'shift cd dir echo setlocal endlocal set pause copy', | ||
stream: 'prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux', | ||
winutils: 'ping net ipconfig taskkill xcopy ren del' | ||
}, | ||
contains: [ | ||
{ | ||
className: 'envvar', begin: '%%[^ ]' | ||
}, | ||
contains: [ | ||
{ | ||
className: 'envvar', begin: '%%[^ ]' | ||
}, | ||
{ | ||
className: 'envvar', begin: '%[^ ]+?%' | ||
}, | ||
{ | ||
className: 'envvar', begin: '![^ ]+?!' | ||
}, | ||
{ | ||
className: 'number', begin: '\\b\\d+', | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '@?rem', end: '$' | ||
} | ||
] | ||
} | ||
{ | ||
className: 'envvar', begin: '%[^ ]+?%' | ||
}, | ||
{ | ||
className: 'envvar', begin: '![^ ]+?!' | ||
}, | ||
{ | ||
className: 'number', begin: '\\b\\d+', | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '@?rem', end: '$' | ||
} | ||
] | ||
}; | ||
}; |
module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: { | ||
special_functions: | ||
'spawn spawn_link self', | ||
reserved: | ||
'after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if ' + | ||
'let not of or orelse|10 query receive rem try when xor' | ||
keywords: { | ||
special_functions: | ||
'spawn spawn_link self', | ||
reserved: | ||
'after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if ' + | ||
'let not of or orelse|10 query receive rem try when xor' | ||
}, | ||
contains: [ | ||
{ | ||
className: 'input_number', begin: '^[0-9]+> ', | ||
relevance: 10 | ||
}, | ||
contains: [ | ||
{ | ||
className: 'input_number', begin: '^[0-9]+> ', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '%', end: '$' | ||
}, | ||
{ | ||
className: 'number', | ||
begin: '\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)', | ||
relevance: 0 | ||
}, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'constant', begin: '\\?(::)?([A-Z]\\w*(::)?)+' | ||
}, | ||
{ | ||
className: 'arrow', begin: '->' | ||
}, | ||
{ | ||
className: 'ok', begin: 'ok' | ||
}, | ||
{ | ||
className: 'exclamation_mark', begin: '!' | ||
}, | ||
{ | ||
className: 'function_or_atom', | ||
begin: '(\\b[a-z\'][a-zA-Z0-9_\']*:[a-z\'][a-zA-Z0-9_\']*)|(\\b[a-z\'][a-zA-Z0-9_\']*)', | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'variable', | ||
begin: '[A-Z][a-zA-Z0-9_\']*', | ||
relevance: 0 | ||
} | ||
] | ||
} | ||
{ | ||
className: 'comment', | ||
begin: '%', end: '$' | ||
}, | ||
{ | ||
className: 'number', | ||
begin: '\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)', | ||
relevance: 0 | ||
}, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'constant', begin: '\\?(::)?([A-Z]\\w*(::)?)+' | ||
}, | ||
{ | ||
className: 'arrow', begin: '->' | ||
}, | ||
{ | ||
className: 'ok', begin: 'ok' | ||
}, | ||
{ | ||
className: 'exclamation_mark', begin: '!' | ||
}, | ||
{ | ||
className: 'function_or_atom', | ||
begin: '(\\b[a-z\'][a-zA-Z0-9_\']*:[a-z\'][a-zA-Z0-9_\']*)|(\\b[a-z\'][a-zA-Z0-9_\']*)', | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'variable', | ||
begin: '[A-Z][a-zA-Z0-9_\']*', | ||
relevance: 0 | ||
} | ||
] | ||
}; | ||
}; |
@@ -115,45 +115,43 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: ERLANG_RESERVED, | ||
illegal: '(</|\\*=|\\+=|-=|/=|/\\*|\\*/|\\(\\*|\\*\\))', | ||
contains: [ | ||
{ | ||
className: 'function', | ||
begin: '^' + BASIC_ATOM_RE + '\\s*\\(', end: '->', | ||
returnBegin: true, | ||
illegal: '\\(|#|//|/\\*|\\\\|:', | ||
contains: [ | ||
PARAMS, | ||
{ | ||
className: 'title', begin: BASIC_ATOM_RE | ||
} | ||
], | ||
starts: { | ||
end: ';|\\.', | ||
keywords: ERLANG_RESERVED, | ||
contains: BASIC_MODES | ||
keywords: ERLANG_RESERVED, | ||
illegal: '(</|\\*=|\\+=|-=|/=|/\\*|\\*/|\\(\\*|\\*\\))', | ||
contains: [ | ||
{ | ||
className: 'function', | ||
begin: '^' + BASIC_ATOM_RE + '\\s*\\(', end: '->', | ||
returnBegin: true, | ||
illegal: '\\(|#|//|/\\*|\\\\|:', | ||
contains: [ | ||
PARAMS, | ||
{ | ||
className: 'title', begin: BASIC_ATOM_RE | ||
} | ||
}, | ||
COMMENT, | ||
{ | ||
className: 'pp', | ||
begin: '^-', end: '\\.', | ||
relevance: 0, | ||
excludeEnd: true, | ||
returnBegin: true, | ||
lexems: '-' + hljs.IDENT_RE, | ||
keywords: | ||
'-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn ' + | ||
'-import -include -include_lib -compile -define -else -endif -file -behaviour ' + | ||
'-behavior', | ||
contains: [PARAMS] | ||
}, | ||
NUMBER, | ||
hljs.QUOTE_STRING_MODE, | ||
RECORD_ACCESS, | ||
VAR1, VAR2, | ||
TUPLE | ||
] | ||
} | ||
], | ||
starts: { | ||
end: ';|\\.', | ||
keywords: ERLANG_RESERVED, | ||
contains: BASIC_MODES | ||
} | ||
}, | ||
COMMENT, | ||
{ | ||
className: 'pp', | ||
begin: '^-', end: '\\.', | ||
relevance: 0, | ||
excludeEnd: true, | ||
returnBegin: true, | ||
lexems: '-' + hljs.IDENT_RE, | ||
keywords: | ||
'-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn ' + | ||
'-import -include -include_lib -compile -define -else -endif -file -behaviour ' + | ||
'-behavior', | ||
contains: [PARAMS] | ||
}, | ||
NUMBER, | ||
hljs.QUOTE_STRING_MODE, | ||
RECORD_ACCESS, | ||
VAR1, VAR2, | ||
TUPLE | ||
] | ||
}; | ||
}; |
180
glsl.js
module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: { | ||
keyword: | ||
'atomic_uint attribute bool break bvec2 bvec3 bvec4 case centroid coherent const continue default ' + | ||
'discard dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 ' + | ||
'dmat4x4 do double dvec2 dvec3 dvec4 else flat float for highp if iimage1D iimage1DArray ' + | ||
'iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube ' + | ||
'iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect ' + | ||
'image3D imageBuffer imageCube imageCubeArray in inout int invariant isampler1D isampler1DArray ' + | ||
'isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer ' + | ||
'isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 layout lowp mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 ' + | ||
'mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 mediump noperspective out patch precision readonly restrict ' + | ||
'return sample sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray ' + | ||
'sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow ' + | ||
'sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow smooth ' + | ||
'struct subroutine switch uimage1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray ' + | ||
'uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint uniform usampler1D usampler1DArray ' + | ||
'usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D usamplerBuffer ' + | ||
'usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 varying vec2 vec3 vec4 void volatile while writeonly', | ||
built_in: | ||
'gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial ' + | ||
'gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color ' + | ||
'gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord ' + | ||
'gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor ' + | ||
'gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial ' + | ||
'gl_FrontSecondaryColor gl_InstanceID gl_InvocationID gl_Layer gl_LightModel ' + | ||
'gl_LightSource gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize ' + | ||
'gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers ' + | ||
'gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs ' + | ||
'gl_MaxCombinedTextureImageUnits gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers ' + | ||
'gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents ' + | ||
'gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers ' + | ||
'gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents ' + | ||
'gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits ' + | ||
'gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents ' + | ||
'gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset ' + | ||
'gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms ' + | ||
'gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits ' + | ||
'gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents ' + | ||
'gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters ' + | ||
'gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents ' + | ||
'gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents ' + | ||
'gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits ' + | ||
'gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors ' + | ||
'gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs ' + | ||
'gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexTextureImageUnits ' + | ||
'gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset'+ | ||
'gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose ' + | ||
'gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse ' + | ||
'gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose ' + | ||
'gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 ' + | ||
'gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix ' + | ||
'gl_NormalScale gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn ' + | ||
'gl_PerVertex gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn ' + | ||
'gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose ' + | ||
'gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition ' + | ||
'gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor ' + | ||
'gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID ' + | ||
'gl_ViewportIndex gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive ' + | ||
'abs acos acosh all any asin asinh atan atanh atomicCounter atomicCounterDecrement ' + | ||
'atomicCounterIncrement barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ' + | ||
'ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward ' + | ||
'findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan ' + | ||
'greaterThanEqual imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange ' + | ||
'imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageStore imulExtended ' + | ||
'intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt ' + | ||
'isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier ' + | ||
'min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 ' + | ||
'packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract ' + | ||
'round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj ' + | ||
'shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture ' + | ||
'texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj ' + | ||
'texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod ' + | ||
'textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod ' + | ||
'textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod ' + | ||
'textureProjLodOffset textureProjOffset textureQueryLod textureSize transpose trunc uaddCarry ' + | ||
'uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 ' + | ||
'unpackUnorm2x16 unpackUnorm4x8 usubBorrow gl_TextureMatrix gl_TextureMatrixInverse', | ||
literal: 'true false' | ||
}, | ||
illegal: '"', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#', end: '$' | ||
} | ||
] | ||
} | ||
keywords: { | ||
keyword: | ||
'atomic_uint attribute bool break bvec2 bvec3 bvec4 case centroid coherent const continue default ' + | ||
'discard dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 ' + | ||
'dmat4x4 do double dvec2 dvec3 dvec4 else flat float for highp if iimage1D iimage1DArray ' + | ||
'iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube ' + | ||
'iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect ' + | ||
'image3D imageBuffer imageCube imageCubeArray in inout int invariant isampler1D isampler1DArray ' + | ||
'isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer ' + | ||
'isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 layout lowp mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 ' + | ||
'mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 mediump noperspective out patch precision readonly restrict ' + | ||
'return sample sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray ' + | ||
'sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow ' + | ||
'sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow smooth ' + | ||
'struct subroutine switch uimage1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray ' + | ||
'uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint uniform usampler1D usampler1DArray ' + | ||
'usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D usamplerBuffer ' + | ||
'usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 varying vec2 vec3 vec4 void volatile while writeonly', | ||
built_in: | ||
'gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial ' + | ||
'gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color ' + | ||
'gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord ' + | ||
'gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor ' + | ||
'gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial ' + | ||
'gl_FrontSecondaryColor gl_InstanceID gl_InvocationID gl_Layer gl_LightModel ' + | ||
'gl_LightSource gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize ' + | ||
'gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers ' + | ||
'gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs ' + | ||
'gl_MaxCombinedTextureImageUnits gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers ' + | ||
'gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents ' + | ||
'gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers ' + | ||
'gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents ' + | ||
'gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits ' + | ||
'gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents ' + | ||
'gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset ' + | ||
'gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms ' + | ||
'gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits ' + | ||
'gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents ' + | ||
'gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters ' + | ||
'gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents ' + | ||
'gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents ' + | ||
'gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits ' + | ||
'gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors ' + | ||
'gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs ' + | ||
'gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexTextureImageUnits ' + | ||
'gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset'+ | ||
'gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose ' + | ||
'gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse ' + | ||
'gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose ' + | ||
'gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 ' + | ||
'gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix ' + | ||
'gl_NormalScale gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn ' + | ||
'gl_PerVertex gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn ' + | ||
'gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose ' + | ||
'gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition ' + | ||
'gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor ' + | ||
'gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID ' + | ||
'gl_ViewportIndex gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive ' + | ||
'abs acos acosh all any asin asinh atan atanh atomicCounter atomicCounterDecrement ' + | ||
'atomicCounterIncrement barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ' + | ||
'ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward ' + | ||
'findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan ' + | ||
'greaterThanEqual imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange ' + | ||
'imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageStore imulExtended ' + | ||
'intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt ' + | ||
'isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier ' + | ||
'min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 ' + | ||
'packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract ' + | ||
'round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj ' + | ||
'shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture ' + | ||
'texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj ' + | ||
'texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod ' + | ||
'textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod ' + | ||
'textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod ' + | ||
'textureProjLodOffset textureProjOffset textureQueryLod textureSize transpose trunc uaddCarry ' + | ||
'uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 ' + | ||
'unpackUnorm2x16 unpackUnorm4x8 usubBorrow gl_TextureMatrix gl_TextureMatrixInverse', | ||
literal: 'true false' | ||
}, | ||
illegal: '"', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#', end: '$' | ||
} | ||
] | ||
}; | ||
}; |
46
go.js
@@ -15,27 +15,25 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: GO_KEYWORDS, | ||
illegal: '</', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'string', | ||
begin: '\'', end: '[^\\\\]\'', | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'string', | ||
begin: '`', end: '`' | ||
}, | ||
{ | ||
className: 'number', | ||
begin: '[^a-zA-Z_0-9](\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?', | ||
relevance: 0 | ||
}, | ||
hljs.C_NUMBER_MODE | ||
] | ||
} | ||
keywords: GO_KEYWORDS, | ||
illegal: '</', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'string', | ||
begin: '\'', end: '[^\\\\]\'', | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'string', | ||
begin: '`', end: '`' | ||
}, | ||
{ | ||
className: 'number', | ||
begin: '[^a-zA-Z_0-9](\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?', | ||
relevance: 0 | ||
}, | ||
hljs.C_NUMBER_MODE | ||
] | ||
}; | ||
}; |
122
haskell.js
@@ -22,65 +22,63 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: | ||
'let in if then else case of where do module import hiding qualified type data ' + | ||
'newtype deriving class instance not as foreign ccall safe unsafe', | ||
contains: [ | ||
{ | ||
className: 'comment', | ||
begin: '--', end: '$' | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
begin: '{-#', end: '#-}' | ||
}, | ||
{ | ||
className: 'comment', | ||
contains: ['self'], | ||
begin: '{-', end: '-}' | ||
}, | ||
{ | ||
className: 'string', | ||
begin: '\\s+\'', end: '\'', | ||
contains: [hljs.BACKSLASH_ESCAPE], | ||
relevance: 0 | ||
}, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'import', | ||
begin: '\\bimport', end: '$', | ||
keywords: 'import qualified as hiding', | ||
contains: [CONTAINER], | ||
illegal: '\\W\\.|;' | ||
}, | ||
{ | ||
className: 'module', | ||
begin: '\\bmodule', end: 'where', | ||
keywords: 'module where', | ||
contains: [CONTAINER], | ||
illegal: '\\W\\.|;' | ||
}, | ||
{ | ||
className: 'class', | ||
begin: '\\b(class|instance)', end: 'where', | ||
keywords: 'class where instance', | ||
contains: [TYPE] | ||
}, | ||
{ | ||
className: 'typedef', | ||
begin: '\\b(data|(new)?type)', end: '$', | ||
keywords: 'data type newtype deriving', | ||
contains: [TYPE, CONTAINER, CONTAINER2] | ||
}, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'shebang', | ||
begin: '#!\\/usr\\/bin\\/env\ runhaskell', end: '$' | ||
}, | ||
TYPE, | ||
{ | ||
className: 'title', begin: '^[_a-z][\\w\']*' | ||
} | ||
] | ||
} | ||
keywords: | ||
'let in if then else case of where do module import hiding qualified type data ' + | ||
'newtype deriving class instance not as foreign ccall safe unsafe', | ||
contains: [ | ||
{ | ||
className: 'comment', | ||
begin: '--', end: '$' | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
begin: '{-#', end: '#-}' | ||
}, | ||
{ | ||
className: 'comment', | ||
contains: ['self'], | ||
begin: '{-', end: '-}' | ||
}, | ||
{ | ||
className: 'string', | ||
begin: '\\s+\'', end: '\'', | ||
contains: [hljs.BACKSLASH_ESCAPE], | ||
relevance: 0 | ||
}, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'import', | ||
begin: '\\bimport', end: '$', | ||
keywords: 'import qualified as hiding', | ||
contains: [CONTAINER], | ||
illegal: '\\W\\.|;' | ||
}, | ||
{ | ||
className: 'module', | ||
begin: '\\bmodule', end: 'where', | ||
keywords: 'module where', | ||
contains: [CONTAINER], | ||
illegal: '\\W\\.|;' | ||
}, | ||
{ | ||
className: 'class', | ||
begin: '\\b(class|instance)', end: 'where', | ||
keywords: 'class where instance', | ||
contains: [TYPE] | ||
}, | ||
{ | ||
className: 'typedef', | ||
begin: '\\b(data|(new)?type)', end: '$', | ||
keywords: 'data type newtype deriving', | ||
contains: [TYPE, CONTAINER, CONTAINER2] | ||
}, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'shebang', | ||
begin: '#!\\/usr\\/bin\\/env\ runhaskell', end: '$' | ||
}, | ||
TYPE, | ||
{ | ||
className: 'title', begin: '^[_a-z][\\w\']*' | ||
} | ||
] | ||
}; | ||
}; |
118
highlight.js
@@ -9,9 +9,2 @@ var hljs = new function() { | ||
function langRe(language, value, global) { | ||
return RegExp( | ||
value, | ||
'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '') | ||
); | ||
} | ||
function findCode(pre) { | ||
@@ -156,7 +149,15 @@ for (var i = 0; i < pre.childNodes.length; i++) { | ||
function compileModes(language_name) { | ||
function compileLanguage(language) { | ||
function compileMode(mode, language, is_default) { | ||
function langRe(value, global) { | ||
return RegExp( | ||
value, | ||
'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '') | ||
); | ||
} | ||
function compileMode(mode, parent) { | ||
if (mode.compiled) | ||
return; | ||
mode.compiled = true; | ||
@@ -176,3 +177,3 @@ var keywords = []; // used later with beginWithKeyword but filled as a side-effect of keywords compilation | ||
mode.lexemsRe = langRe(language, mode.lexems || hljs.IDENT_RE, true); | ||
mode.lexemsRe = langRe(mode.lexems || hljs.IDENT_RE, true); | ||
if (typeof mode.keywords == 'string') { // string | ||
@@ -189,14 +190,17 @@ flatten('keyword', mode.keywords) | ||
} | ||
if (!is_default) { | ||
if (parent) { | ||
if (mode.beginWithKeyword) { | ||
mode.begin = '\\b(' + keywords.join('|') + ')\\s'; | ||
} | ||
mode.beginRe = langRe(language, mode.begin ? mode.begin : '\\B|\\b'); | ||
mode.beginRe = langRe(mode.begin ? mode.begin : '\\B|\\b'); | ||
if (!mode.end && !mode.endsWithParent) | ||
mode.end = '\\B|\\b'; | ||
if (mode.end) | ||
mode.endRe = langRe(language, mode.end); | ||
mode.endRe = langRe(mode.end); | ||
mode.terminator_end = mode.end || ''; | ||
if (mode.endsWithParent && parent.terminator_end) | ||
mode.terminator_end += (mode.end ? '|' : '') + parent.terminator_end; | ||
} | ||
if (mode.illegal) | ||
mode.illegalRe = langRe(language, mode.illegal); | ||
mode.illegalRe = langRe(mode.illegal); | ||
if (mode.relevance === undefined) | ||
@@ -207,5 +211,2 @@ mode.relevance = 1; | ||
} | ||
// compiled flag is set before compiling submodes to avoid self-recursion | ||
// (see lisp where quoted_list contains quoted_list) | ||
mode.compiled = true; | ||
for (var i = 0; i < mode.contains.length; i++) { | ||
@@ -215,13 +216,24 @@ if (mode.contains[i] == 'self') { | ||
} | ||
compileMode(mode.contains[i], language, false); | ||
compileMode(mode.contains[i], mode); | ||
} | ||
if (mode.starts) { | ||
compileMode(mode.starts, language, false); | ||
compileMode(mode.starts, parent); | ||
} | ||
var terminators = []; | ||
for (var i = 0; i < mode.contains.length; i++) { | ||
terminators.push(mode.contains[i].begin); | ||
} | ||
if (mode.terminator_end) { | ||
terminators.push(mode.terminator_end); | ||
} | ||
if (mode.illegal) { | ||
terminators.push(mode.illegal); | ||
} | ||
mode.terminators = terminators.length ? langRe(terminators.join('|'), true) : null; | ||
} | ||
compileMode(languages[language_name].defaultMode, languages[language_name], true); | ||
compileMode(language); | ||
} | ||
var compiled_languages = {}; | ||
/* | ||
@@ -237,6 +249,2 @@ Core highlighting function. Accepts a language name and a string with the | ||
function highlight(language_name, value) { | ||
if (!compiled_languages[language_name]) { | ||
compileModes(language_name); | ||
compiled_languages[language_name] = true; | ||
} | ||
@@ -266,35 +274,8 @@ function subMode(lexem, mode) { | ||
function compileTerminators(mode, language) { | ||
var terminators = []; | ||
for (var i = 0; i < mode.contains.length; i++) { | ||
terminators.push(mode.contains[i].begin); | ||
} | ||
var index = modes.length - 1; | ||
do { | ||
if (modes[index].end) { | ||
terminators.push(modes[index].end); | ||
} | ||
index--; | ||
} while (modes[index + 1].endsWithParent); | ||
if (mode.illegal) { | ||
terminators.push(mode.illegal); | ||
} | ||
return terminators.length ? langRe(language, terminators.join('|'), true) : null; | ||
} | ||
function eatModeChunk(value, index) { | ||
var mode = modes[modes.length - 1]; | ||
if (mode.terminators === undefined) { | ||
mode.terminators = compileTerminators(mode, language); | ||
} | ||
var match; | ||
if (mode.terminators) { | ||
mode.terminators.lastIndex = index; | ||
match = mode.terminators.exec(value); | ||
return mode.terminators.exec(value); | ||
} | ||
return match ? [value.substr(index, match.index - index), match[0], false] : [value.substr(index), '', true]; | ||
} | ||
@@ -375,7 +356,7 @@ | ||
function processModeInfo(buffer, lexem, end) { | ||
function processModeInfo(buffer, lexem) { | ||
var current_mode = modes[modes.length - 1]; | ||
if (end) { | ||
if (lexem === undefined) { | ||
result += processBuffer(current_mode.buffer + buffer, current_mode); | ||
return false; | ||
return; | ||
} | ||
@@ -420,3 +401,5 @@ | ||
var language = languages[language_name]; | ||
var modes = [language.defaultMode]; | ||
compileLanguage(language); | ||
var modes = [language]; | ||
language.buffer = ''; | ||
var relevance = 0; | ||
@@ -426,12 +409,11 @@ var keyword_count = 0; | ||
try { | ||
var mode_info, index = 0; | ||
language.defaultMode.buffer = ''; | ||
do { | ||
mode_info = eatModeChunk(value, index); | ||
var return_lexem = processModeInfo(mode_info[0], mode_info[1], mode_info[2]); | ||
index += mode_info[0].length; | ||
if (!return_lexem) { | ||
index += mode_info[1].length; | ||
} | ||
} while (!mode_info[2]); | ||
var match, index = 0; | ||
while (true) { | ||
match = eatModeChunk(value, index); | ||
if (!match) | ||
break; | ||
var return_lexem = processModeInfo(value.substr(index, match.index - index), match[0]); | ||
index = match.index + (return_lexem ? 0 : match[0].length); | ||
} | ||
processModeInfo(value.substr(index), undefined); | ||
return { | ||
@@ -438,0 +420,0 @@ relevance: relevance, |
60
http.js
module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
illegal: '\\S', | ||
contains: [ | ||
{ | ||
className: 'status', | ||
begin: '^HTTP/[0-9\\.]+', end: '$', | ||
contains: [{className: 'number', begin: '\\b\\d{3}\\b'}] | ||
}, | ||
{ | ||
className: 'request', | ||
begin: '^[A-Z]+ (.*?) HTTP/[0-9\\.]+$', returnBegin: true, end: '$', | ||
contains: [ | ||
{ | ||
className: 'string', | ||
begin: ' ', end: ' ', | ||
excludeBegin: true, excludeEnd: true | ||
} | ||
] | ||
}, | ||
{ | ||
className: 'attribute', | ||
begin: '^\\w', end: ': ', excludeEnd: true, | ||
illegal: '\\n', | ||
starts: {className: 'string', end: '$'} | ||
}, | ||
{ | ||
begin: '\\n\\n', | ||
starts: {subLanguage: '', endsWithParent: true} | ||
} | ||
] | ||
} | ||
illegal: '\\S', | ||
contains: [ | ||
{ | ||
className: 'status', | ||
begin: '^HTTP/[0-9\\.]+', end: '$', | ||
contains: [{className: 'number', begin: '\\b\\d{3}\\b'}] | ||
}, | ||
{ | ||
className: 'request', | ||
begin: '^[A-Z]+ (.*?) HTTP/[0-9\\.]+$', returnBegin: true, end: '$', | ||
contains: [ | ||
{ | ||
className: 'string', | ||
begin: ' ', end: ' ', | ||
excludeBegin: true, excludeEnd: true | ||
} | ||
] | ||
}, | ||
{ | ||
className: 'attribute', | ||
begin: '^\\w', end: ': ', excludeEnd: true, | ||
illegal: '\\n|\\s|=', | ||
starts: {className: 'string', end: '$'} | ||
}, | ||
{ | ||
begin: '\\n\\n', | ||
starts: {subLanguage: '', endsWithParent: true} | ||
} | ||
] | ||
}; | ||
}; |
48
ini.js
module.exports = function(hljs) { | ||
return { | ||
case_insensitive: true, | ||
defaultMode: { | ||
illegal: '[^\\s]', | ||
contains: [ | ||
{ | ||
className: 'comment', | ||
begin: ';', end: '$' | ||
}, | ||
{ | ||
className: 'title', | ||
begin: '^\\[', end: '\\]' | ||
}, | ||
{ | ||
className: 'setting', | ||
begin: '^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*', end: '$', | ||
contains: [ | ||
{ | ||
className: 'value', | ||
endsWithParent: true, | ||
keywords: 'on off true false yes no', | ||
contains: [hljs.QUOTE_STRING_MODE, hljs.NUMBER_MODE] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
illegal: '[^\\s]', | ||
contains: [ | ||
{ | ||
className: 'comment', | ||
begin: ';', end: '$' | ||
}, | ||
{ | ||
className: 'title', | ||
begin: '^\\[', end: '\\]' | ||
}, | ||
{ | ||
className: 'setting', | ||
begin: '^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*', end: '$', | ||
contains: [ | ||
{ | ||
className: 'value', | ||
endsWithParent: true, | ||
keywords: 'on off true false yes no', | ||
contains: [hljs.QUOTE_STRING_MODE, hljs.NUMBER_MODE] | ||
} | ||
] | ||
} | ||
] | ||
}; | ||
}; |
82
java.js
module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: | ||
'false synchronized int abstract float private char boolean static null if const ' + | ||
'for true while long throw strictfp finally protected import native final return void ' + | ||
'enum else break transient new catch instanceof byte super volatile case assert short ' + | ||
'package default double public try this switch continue throws', | ||
contains: [ | ||
{ | ||
className: 'javadoc', | ||
begin: '/\\*\\*', end: '\\*/', | ||
contains: [{ | ||
className: 'javadoctag', begin: '@[A-Za-z]+' | ||
}], | ||
relevance: 10 | ||
}, | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'class', | ||
beginWithKeyword: true, end: '{', | ||
keywords: 'class interface', | ||
illegal: ':', | ||
contains: [ | ||
{ | ||
beginWithKeyword: true, | ||
keywords: 'extends implements', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE | ||
} | ||
] | ||
}, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'annotation', begin: '@[A-Za-z]+' | ||
} | ||
] | ||
} | ||
keywords: | ||
'false synchronized int abstract float private char boolean static null if const ' + | ||
'for true while long throw strictfp finally protected import native final return void ' + | ||
'enum else break transient new catch instanceof byte super volatile case assert short ' + | ||
'package default double public try this switch continue throws', | ||
contains: [ | ||
{ | ||
className: 'javadoc', | ||
begin: '/\\*\\*', end: '\\*/', | ||
contains: [{ | ||
className: 'javadoctag', begin: '@[A-Za-z]+' | ||
}], | ||
relevance: 10 | ||
}, | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'class', | ||
beginWithKeyword: true, end: '{', | ||
keywords: 'class interface', | ||
illegal: ':', | ||
contains: [ | ||
{ | ||
beginWithKeyword: true, | ||
keywords: 'extends implements', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE | ||
} | ||
] | ||
}, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'annotation', begin: '@[A-Za-z]+' | ||
} | ||
] | ||
}; | ||
}; |
module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: { | ||
keyword: | ||
'in if for while finally var new function do return void else break catch ' + | ||
'instanceof with throw case default try this switch continue typeof delete ' + | ||
'let yield', | ||
literal: | ||
'true false null undefined NaN Infinity' | ||
keywords: { | ||
keyword: | ||
'in if for while finally var new function do return void else break catch ' + | ||
'instanceof with throw case default try this switch continue typeof delete ' + | ||
'let yield const', | ||
literal: | ||
'true false null undefined NaN Infinity' | ||
}, | ||
contains: [ | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.C_NUMBER_MODE, | ||
{ // regexp container | ||
begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*', | ||
keywords: 'return throw case', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{ | ||
className: 'regexp', | ||
begin: '/', end: '/[gim]*', | ||
contains: [{begin: '\\\\/'}] | ||
} | ||
], | ||
relevance: 0 | ||
}, | ||
contains: [ | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.C_NUMBER_MODE, | ||
{ // regexp container | ||
begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*', | ||
keywords: 'return throw case', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{ | ||
className: 'regexp', | ||
begin: '/', end: '/[gim]*', | ||
contains: [{begin: '\\\\/'}] | ||
} | ||
], | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'function', | ||
beginWithKeyword: true, end: '{', | ||
keywords: 'function', | ||
contains: [ | ||
{ | ||
className: 'title', begin: '[A-Za-z$_][0-9A-Za-z$_]*' | ||
}, | ||
{ | ||
className: 'params', | ||
begin: '\\(', end: '\\)', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE | ||
], | ||
illegal: '["\'\\(]' | ||
} | ||
], | ||
illegal: '\\[|%' | ||
} | ||
] | ||
} | ||
{ | ||
className: 'function', | ||
beginWithKeyword: true, end: '{', | ||
keywords: 'function', | ||
contains: [ | ||
{ | ||
className: 'title', begin: '[A-Za-z$_][0-9A-Za-z$_]*' | ||
}, | ||
{ | ||
className: 'params', | ||
begin: '\\(', end: '\\)', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE | ||
], | ||
illegal: '["\'\\(]' | ||
} | ||
], | ||
illegal: '\\[|%' | ||
} | ||
] | ||
}; | ||
}; |
@@ -33,8 +33,6 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
contains: TYPES, | ||
keywords: LITERALS, | ||
illegal: '\\S' | ||
} | ||
contains: TYPES, | ||
keywords: LITERALS, | ||
illegal: '\\S' | ||
}; | ||
}; |
18
lisp.js
@@ -71,13 +71,11 @@ module.exports = function(hljs) { | ||
case_insensitive: true, | ||
defaultMode: { | ||
illegal: '[^\\s]', | ||
contains: NUMBERS.concat([ | ||
LITERAL, | ||
STRING, | ||
COMMENT, | ||
QUOTED1, QUOTED2, | ||
LIST | ||
]) | ||
} | ||
illegal: '[^\\s]', | ||
contains: NUMBERS.concat([ | ||
LITERAL, | ||
STRING, | ||
COMMENT, | ||
QUOTED1, QUOTED2, | ||
LIST | ||
]) | ||
}; | ||
}; |
76
lua.js
@@ -21,43 +21,41 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
lexems: hljs.UNDERSCORE_IDENT_RE, | ||
keywords: { | ||
keyword: | ||
'and break do else elseif end false for if in local nil not or repeat return then ' + | ||
'true until while', | ||
built_in: | ||
'_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load ' + | ||
'loadfile loadstring module next pairs pcall print rawequal rawget rawset require ' + | ||
'select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug ' + | ||
'io math os package string table' | ||
lexems: hljs.UNDERSCORE_IDENT_RE, | ||
keywords: { | ||
keyword: | ||
'and break do else elseif end false for if in local nil not or repeat return then ' + | ||
'true until while', | ||
built_in: | ||
'_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load ' + | ||
'loadfile loadstring module next pairs pcall print rawequal rawget rawset require ' + | ||
'select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug ' + | ||
'io math os package string table' | ||
}, | ||
contains: COMMENTS.concat([ | ||
{ | ||
className: 'function', | ||
beginWithKeyword: true, end: '\\)', | ||
keywords: 'function', | ||
contains: [ | ||
{ | ||
className: 'title', | ||
begin: '([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*' | ||
}, | ||
{ | ||
className: 'params', | ||
begin: '\\(', endsWithParent: true, | ||
contains: COMMENTS | ||
} | ||
].concat(COMMENTS) | ||
}, | ||
contains: COMMENTS.concat([ | ||
{ | ||
className: 'function', | ||
beginWithKeyword: true, end: '\\)', | ||
keywords: 'function', | ||
contains: [ | ||
{ | ||
className: 'title', | ||
begin: '([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*' | ||
}, | ||
{ | ||
className: 'params', | ||
begin: '\\(', endsWithParent: true, | ||
contains: COMMENTS | ||
} | ||
].concat(COMMENTS) | ||
}, | ||
hljs.C_NUMBER_MODE, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'string', | ||
begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET, | ||
contains: [LONG_BRACKETS], | ||
relevance: 10 | ||
} | ||
]) | ||
} | ||
hljs.C_NUMBER_MODE, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'string', | ||
begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET, | ||
contains: [LONG_BRACKETS], | ||
relevance: 10 | ||
} | ||
]) | ||
}; | ||
}; |
148
markdown.js
module.exports = function(hljs) { | ||
return { | ||
case_insensitive: true, | ||
defaultMode: { | ||
contains: [ | ||
// highlight headers | ||
{ | ||
className: 'header', | ||
begin: '^#{1,3}', end: '$' | ||
}, | ||
{ | ||
className: 'header', | ||
begin: '^.+?\\n[=-]{2,}$' | ||
}, | ||
// inline html | ||
{ | ||
begin: '<', end: '>', | ||
subLanguage: 'xml', | ||
relevance: 0 | ||
}, | ||
// lists (indicators only) | ||
{ | ||
className: 'bullet', | ||
begin: '^([*+-]|(\\d+\\.))\\s+' | ||
}, | ||
// strong segments | ||
{ | ||
className: 'strong', | ||
begin: '[*_]{2}.+?[*_]{2}' | ||
}, | ||
// emphasis segments | ||
{ | ||
className: 'emphasis', | ||
begin: '\\*.+?\\*' | ||
}, | ||
{ | ||
className: 'emphasis', | ||
begin: '_.+?_', | ||
relevance: 0 | ||
}, | ||
// blockquotes | ||
{ | ||
className: 'blockquote', | ||
begin: '^>\\s+', end: '$' | ||
}, | ||
// code snippets | ||
{ | ||
className: 'code', | ||
begin: '`.+?`' | ||
}, | ||
{ | ||
className: 'code', | ||
begin: '^ ', end: '$', | ||
relevance: 0 | ||
}, | ||
// horizontal rules | ||
{ | ||
className: 'horizontal_rule', | ||
begin: '^-{3,}', end: '$' | ||
}, | ||
// using links - title and link | ||
{ | ||
begin: '\\[.+?\\]\\(.+?\\)', | ||
returnBegin: true, | ||
contains: [ | ||
{ | ||
className: 'link_label', | ||
begin: '\\[.+\\]' | ||
}, | ||
{ | ||
className: 'link_url', | ||
begin: '\\(', end: '\\)', | ||
excludeBegin: true, excludeEnd: true | ||
} | ||
] | ||
} | ||
] | ||
} | ||
contains: [ | ||
// highlight headers | ||
{ | ||
className: 'header', | ||
begin: '^#{1,3}', end: '$' | ||
}, | ||
{ | ||
className: 'header', | ||
begin: '^.+?\\n[=-]{2,}$' | ||
}, | ||
// inline html | ||
{ | ||
begin: '<', end: '>', | ||
subLanguage: 'xml', | ||
relevance: 0 | ||
}, | ||
// lists (indicators only) | ||
{ | ||
className: 'bullet', | ||
begin: '^([*+-]|(\\d+\\.))\\s+' | ||
}, | ||
// strong segments | ||
{ | ||
className: 'strong', | ||
begin: '[*_]{2}.+?[*_]{2}' | ||
}, | ||
// emphasis segments | ||
{ | ||
className: 'emphasis', | ||
begin: '\\*.+?\\*' | ||
}, | ||
{ | ||
className: 'emphasis', | ||
begin: '_.+?_', | ||
relevance: 0 | ||
}, | ||
// blockquotes | ||
{ | ||
className: 'blockquote', | ||
begin: '^>\\s+', end: '$' | ||
}, | ||
// code snippets | ||
{ | ||
className: 'code', | ||
begin: '`.+?`' | ||
}, | ||
{ | ||
className: 'code', | ||
begin: '^ ', end: '$', | ||
relevance: 0 | ||
}, | ||
// horizontal rules | ||
{ | ||
className: 'horizontal_rule', | ||
begin: '^-{3,}', end: '$' | ||
}, | ||
// using links - title and link | ||
{ | ||
begin: '\\[.+?\\]\\(.+?\\)', | ||
returnBegin: true, | ||
contains: [ | ||
{ | ||
className: 'link_label', | ||
begin: '\\[.+\\]' | ||
}, | ||
{ | ||
className: 'link_url', | ||
begin: '\\(', end: '\\)', | ||
excludeBegin: true, excludeEnd: true | ||
} | ||
] | ||
} | ||
] | ||
}; | ||
}; |
124
matlab.js
module.exports = function(hljs) { | ||
var COMMON_CONTAINS = [ | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'string', | ||
begin: '\'', end: '\'', | ||
contains: [hljs.BACKSLASH_ESCAPE, {begin: '\'\''}], | ||
relevance: 0 | ||
} | ||
]; | ||
return { | ||
defaultMode: { | ||
keywords: { | ||
keyword: | ||
'break case catch classdef continue else elseif end enumerated events for function ' + | ||
'global if methods otherwise parfor persistent properties return spmd switch try while', | ||
built_in: | ||
'sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan ' + | ||
'atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot ' + | ||
'cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog ' + | ||
'realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal ' + | ||
'cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli ' + | ||
'besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma ' + | ||
'gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms ' + | ||
'nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones ' + | ||
'eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ' + | ||
'ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril ' + | ||
'triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute ' + | ||
'shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan ' + | ||
'isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal ' + | ||
'rosser toeplitz vander wilkinson' | ||
keywords: { | ||
keyword: | ||
'break case catch classdef continue else elseif end enumerated events for function ' + | ||
'global if methods otherwise parfor persistent properties return spmd switch try while', | ||
built_in: | ||
'sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan ' + | ||
'atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot ' + | ||
'cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog ' + | ||
'realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal ' + | ||
'cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli ' + | ||
'besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma ' + | ||
'gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms ' + | ||
'nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones ' + | ||
'eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ' + | ||
'ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril ' + | ||
'triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute ' + | ||
'shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan ' + | ||
'isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal ' + | ||
'rosser toeplitz vander wilkinson' | ||
}, | ||
illegal: '(//|"|#|/\\*|\\s+/\\w+)', | ||
contains: [ | ||
{ | ||
className: 'function', | ||
beginWithKeyword: true, end: '$', | ||
keywords: 'function', | ||
contains: [ | ||
{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE | ||
}, | ||
{ | ||
className: 'params', | ||
begin: '\\(', end: '\\)' | ||
}, | ||
{ | ||
className: 'params', | ||
begin: '\\[', end: '\\]' | ||
} | ||
] | ||
}, | ||
illegal: '(//|"|#|/\\*|\\s+/\\w+)', | ||
contains: [ | ||
{ | ||
className: 'function', | ||
beginWithKeyword: true, end: '$', | ||
keywords: 'function', | ||
contains: [ | ||
{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE | ||
}, | ||
{ | ||
className: 'params', | ||
begin: '\\(', end: '\\)' | ||
}, | ||
{ | ||
className: 'params', | ||
begin: '\\[', end: '\\]' | ||
} | ||
] | ||
}, | ||
{ | ||
className: 'string', | ||
begin: '\'', end: '\'', | ||
contains: [hljs.BACKSLASH_ESCAPE, {begin: '\'\''}], | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '\\%', end: '$' | ||
}, | ||
hljs.C_NUMBER_MODE | ||
] | ||
} | ||
{ | ||
className: 'transposed_variable', | ||
begin: '[a-zA-Z_][a-zA-Z_0-9]*(\'+[\\.\']*|[\\.\']+)', end: '' | ||
}, | ||
{ | ||
className: 'matrix', | ||
begin: '\\[', end: '\\]\'*[\\.\']*', | ||
contains: COMMON_CONTAINS | ||
}, | ||
{ | ||
className: 'cell', | ||
begin: '\\{', end: '\\}\'*[\\.\']*', | ||
contains: COMMON_CONTAINS | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '\\%', end: '$' | ||
} | ||
].concat(COMMON_CONTAINS) | ||
}; | ||
}; |
454
mel.js
module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: | ||
'int float string vector matrix if else switch case default while do for in break ' + | ||
'continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic ' + | ||
'addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey ' + | ||
'affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve ' + | ||
'alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor ' + | ||
'animDisplay animView annotate appendStringArray applicationName applyAttrPreset ' + | ||
'applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx ' + | ||
'artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu ' + | ||
'artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand ' + | ||
'assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface ' + | ||
'attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu ' + | ||
'attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp ' + | ||
'attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery ' + | ||
'autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults ' + | ||
'bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership ' + | ||
'bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType ' + | ||
'boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu ' + | ||
'buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge ' + | ||
'cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch ' + | ||
'catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox ' + | ||
'character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp ' + | ||
'checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip ' + | ||
'clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore ' + | ||
'closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter ' + | ||
'cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color ' + | ||
'colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp ' + | ||
'colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem ' + | ||
'componentEditor compositingInterop computePolysetVolume condition cone confirmDialog ' + | ||
'connectAttr connectControl connectDynamic connectJoint connectionInfo constrain ' + | ||
'constrainValue constructionHistory container containsMultibyte contextInfo control ' + | ||
'convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation ' + | ||
'convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache ' + | ||
'cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel ' + | ||
'cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver ' + | ||
'cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor ' + | ||
'createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer ' + | ||
'createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse ' + | ||
'currentCtx currentTime currentTimeCtx currentUnit currentUnit curve curveAddPtCtx ' + | ||
'curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface ' + | ||
'curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox ' + | ||
'defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete ' + | ||
'deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes ' + | ||
'delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo ' + | ||
'dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable ' + | ||
'disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected ' + | ||
'displayColor displayCull displayLevelOfDetail displayPref displayRGBColor ' + | ||
'displaySmoothness displayStats displayString displaySurface distanceDimContext ' + | ||
'distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct ' + | ||
'doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator ' + | ||
'duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression ' + | ||
'dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor ' + | ||
'dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers ' + | ||
'editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor ' + | ||
'editorTemplate effector emit emitter enableDevice encodeString endString endsWith env ' + | ||
'equivalent equivalentTol erf error eval eval evalDeferred evalEcho event ' + | ||
'exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp ' + | ||
'expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof ' + | ||
'fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo ' + | ||
'filetest filletCurve filter filterCurve filterExpand filterStudioImport ' + | ||
'findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster ' + | ||
'finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar ' + | ||
'floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo ' + | ||
'fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint ' + | ||
'frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss ' + | ||
'geometryConstraint getApplicationVersionAsFloat getAttr getClassification ' + | ||
'getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes ' + | ||
'getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender ' + | ||
'glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl ' + | ||
'gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid ' + | ||
'gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap ' + | ||
'HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor ' + | ||
'HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached ' + | ||
'HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel ' + | ||
'headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey ' + | ||
'hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender ' + | ||
'hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox ' + | ||
'iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ' + | ||
'ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ' + | ||
'ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform ' + | ||
'insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance ' + | ||
'instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp ' + | ||
'interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf ' + | ||
'isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect ' + | ||
'itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx ' + | ||
'jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner ' + | ||
'keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx ' + | ||
'keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx ' + | ||
'keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx ' + | ||
'keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor ' + | ||
'layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList ' + | ||
'lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep ' + | ||
'listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory ' + | ||
'listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation ' + | ||
'listNodeTypes listPanelCategories listRelatives listSets listTransforms ' + | ||
'listUnselected listerEditor loadFluid loadNewShelf loadPlugin ' + | ||
'loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log ' + | ||
'longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive ' + | ||
'makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext ' + | ||
'manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx ' + | ||
'manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout ' + | ||
'menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp ' + | ||
'mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move ' + | ||
'moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute ' + | ||
'nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast ' + | ||
'nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint ' + | ||
'normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect ' + | ||
'nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref ' + | ||
'nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType ' + | ||
'objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface ' + | ||
'offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit ' + | ||
'orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier ' + | ||
'paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration ' + | ||
'panelHistory paramDimContext paramDimension paramLocator parent parentConstraint ' + | ||
'particle particleExists particleInstancer particleRenderInfo partition pasteKey ' + | ||
'pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture ' + | ||
'pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo ' + | ||
'pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult ' + | ||
'pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend ' + | ||
'polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal ' + | ||
'polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge ' + | ||
'polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge ' + | ||
'polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet ' + | ||
'polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet ' + | ||
'polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection ' + | ||
'polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge ' + | ||
'polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet ' + | ||
'polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix ' + | ||
'polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut ' + | ||
'polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet ' + | ||
'polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge ' + | ||
'polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex ' + | ||
'polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection ' + | ||
'polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection ' + | ||
'polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint ' + | ||
'polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate ' + | ||
'polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge ' + | ||
'polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing ' + | ||
'polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet ' + | ||
'polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace ' + | ||
'popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer ' + | ||
'projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx ' + | ||
'propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd ' + | ||
'python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection ' + | ||
'radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl ' + | ||
'readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference ' + | ||
'referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE ' + | ||
'registerPluginResource rehash reloadImage removeJoint removeMultiInstance ' + | ||
'removePanelCategory rename renameAttr renameSelectionList renameUI render ' + | ||
'renderGlobalsNode renderInfo renderLayerButton renderLayerParent ' + | ||
'renderLayerPostProcess renderLayerUnparent renderManip renderPartition ' + | ||
'renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor ' + | ||
'renderWindowSelectContext renderer reorder reorderDeformers requires reroot ' + | ||
'resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget ' + | ||
'reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx ' + | ||
'rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout ' + | ||
'runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage ' + | ||
'saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale ' + | ||
'scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor ' + | ||
'sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable ' + | ||
'scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt ' + | ||
'searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey ' + | ||
'selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType ' + | ||
'selectedNodes selectionConnection separator setAttr setAttrEnumResource ' + | ||
'setAttrMapping setAttrNiceNameResource setConstraintRestPosition ' + | ||
'setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr ' + | ||
'setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe ' + | ||
'setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag ' + | ||
'setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject ' + | ||
'setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets ' + | ||
'shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare ' + | ||
'shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField ' + | ||
'shortNameOf showHelp showHidden showManipCtx showSelectionInTitle ' + | ||
'showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface ' + | ||
'size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep ' + | ||
'snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound ' + | ||
'soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort ' + | ||
'spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString ' + | ||
'startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp ' + | ||
'stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex ' + | ||
'stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex ' + | ||
'stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString ' + | ||
'stringToStringArray strip stripPrefixFromName stroke subdAutoProjection ' + | ||
'subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV ' + | ||
'subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror ' + | ||
'subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease ' + | ||
'subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring ' + | ||
'surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton ' + | ||
'symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext ' + | ||
'texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext ' + | ||
'texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text ' + | ||
'textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList ' + | ||
'textToShelf textureDisplacePlane textureHairColor texturePlacementContext ' + | ||
'textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath ' + | ||
'toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower ' + | ||
'toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper ' + | ||
'trace track trackCtx transferAttributes transformCompare transformLimits translator ' + | ||
'trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence ' + | ||
'twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit ' + | ||
'unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink ' + | ||
'uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane ' + | ||
'viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex ' + | ||
'waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire ' + | ||
'wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform', | ||
illegal: '</', | ||
contains: [ | ||
hljs.C_NUMBER_MODE, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'string', | ||
begin: '`', end: '`', | ||
contains: [hljs.BACKSLASH_ESCAPE] | ||
}, | ||
{ | ||
className: 'variable', | ||
begin: '\\$\\d', | ||
relevance: 5 | ||
}, | ||
{ | ||
className: 'variable', | ||
begin: '[\\$\\%\\@\\*](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)' | ||
}, | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE | ||
] | ||
} | ||
keywords: | ||
'int float string vector matrix if else switch case default while do for in break ' + | ||
'continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic ' + | ||
'addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey ' + | ||
'affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve ' + | ||
'alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor ' + | ||
'animDisplay animView annotate appendStringArray applicationName applyAttrPreset ' + | ||
'applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx ' + | ||
'artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu ' + | ||
'artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand ' + | ||
'assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface ' + | ||
'attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu ' + | ||
'attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp ' + | ||
'attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery ' + | ||
'autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults ' + | ||
'bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership ' + | ||
'bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType ' + | ||
'boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu ' + | ||
'buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge ' + | ||
'cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch ' + | ||
'catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox ' + | ||
'character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp ' + | ||
'checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip ' + | ||
'clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore ' + | ||
'closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter ' + | ||
'cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color ' + | ||
'colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp ' + | ||
'colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem ' + | ||
'componentEditor compositingInterop computePolysetVolume condition cone confirmDialog ' + | ||
'connectAttr connectControl connectDynamic connectJoint connectionInfo constrain ' + | ||
'constrainValue constructionHistory container containsMultibyte contextInfo control ' + | ||
'convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation ' + | ||
'convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache ' + | ||
'cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel ' + | ||
'cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver ' + | ||
'cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor ' + | ||
'createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer ' + | ||
'createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse ' + | ||
'currentCtx currentTime currentTimeCtx currentUnit currentUnit curve curveAddPtCtx ' + | ||
'curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface ' + | ||
'curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox ' + | ||
'defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete ' + | ||
'deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes ' + | ||
'delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo ' + | ||
'dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable ' + | ||
'disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected ' + | ||
'displayColor displayCull displayLevelOfDetail displayPref displayRGBColor ' + | ||
'displaySmoothness displayStats displayString displaySurface distanceDimContext ' + | ||
'distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct ' + | ||
'doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator ' + | ||
'duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression ' + | ||
'dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor ' + | ||
'dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers ' + | ||
'editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor ' + | ||
'editorTemplate effector emit emitter enableDevice encodeString endString endsWith env ' + | ||
'equivalent equivalentTol erf error eval eval evalDeferred evalEcho event ' + | ||
'exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp ' + | ||
'expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof ' + | ||
'fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo ' + | ||
'filetest filletCurve filter filterCurve filterExpand filterStudioImport ' + | ||
'findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster ' + | ||
'finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar ' + | ||
'floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo ' + | ||
'fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint ' + | ||
'frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss ' + | ||
'geometryConstraint getApplicationVersionAsFloat getAttr getClassification ' + | ||
'getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes ' + | ||
'getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender ' + | ||
'glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl ' + | ||
'gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid ' + | ||
'gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap ' + | ||
'HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor ' + | ||
'HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached ' + | ||
'HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel ' + | ||
'headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey ' + | ||
'hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender ' + | ||
'hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox ' + | ||
'iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ' + | ||
'ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ' + | ||
'ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform ' + | ||
'insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance ' + | ||
'instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp ' + | ||
'interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf ' + | ||
'isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect ' + | ||
'itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx ' + | ||
'jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner ' + | ||
'keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx ' + | ||
'keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx ' + | ||
'keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx ' + | ||
'keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor ' + | ||
'layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList ' + | ||
'lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep ' + | ||
'listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory ' + | ||
'listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation ' + | ||
'listNodeTypes listPanelCategories listRelatives listSets listTransforms ' + | ||
'listUnselected listerEditor loadFluid loadNewShelf loadPlugin ' + | ||
'loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log ' + | ||
'longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive ' + | ||
'makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext ' + | ||
'manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx ' + | ||
'manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout ' + | ||
'menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp ' + | ||
'mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move ' + | ||
'moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute ' + | ||
'nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast ' + | ||
'nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint ' + | ||
'normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect ' + | ||
'nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref ' + | ||
'nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType ' + | ||
'objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface ' + | ||
'offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit ' + | ||
'orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier ' + | ||
'paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration ' + | ||
'panelHistory paramDimContext paramDimension paramLocator parent parentConstraint ' + | ||
'particle particleExists particleInstancer particleRenderInfo partition pasteKey ' + | ||
'pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture ' + | ||
'pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo ' + | ||
'pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult ' + | ||
'pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend ' + | ||
'polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal ' + | ||
'polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge ' + | ||
'polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge ' + | ||
'polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet ' + | ||
'polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet ' + | ||
'polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection ' + | ||
'polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge ' + | ||
'polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet ' + | ||
'polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix ' + | ||
'polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut ' + | ||
'polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet ' + | ||
'polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge ' + | ||
'polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex ' + | ||
'polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection ' + | ||
'polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection ' + | ||
'polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint ' + | ||
'polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate ' + | ||
'polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge ' + | ||
'polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing ' + | ||
'polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet ' + | ||
'polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace ' + | ||
'popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer ' + | ||
'projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx ' + | ||
'propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd ' + | ||
'python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection ' + | ||
'radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl ' + | ||
'readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference ' + | ||
'referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE ' + | ||
'registerPluginResource rehash reloadImage removeJoint removeMultiInstance ' + | ||
'removePanelCategory rename renameAttr renameSelectionList renameUI render ' + | ||
'renderGlobalsNode renderInfo renderLayerButton renderLayerParent ' + | ||
'renderLayerPostProcess renderLayerUnparent renderManip renderPartition ' + | ||
'renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor ' + | ||
'renderWindowSelectContext renderer reorder reorderDeformers requires reroot ' + | ||
'resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget ' + | ||
'reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx ' + | ||
'rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout ' + | ||
'runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage ' + | ||
'saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale ' + | ||
'scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor ' + | ||
'sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable ' + | ||
'scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt ' + | ||
'searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey ' + | ||
'selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType ' + | ||
'selectedNodes selectionConnection separator setAttr setAttrEnumResource ' + | ||
'setAttrMapping setAttrNiceNameResource setConstraintRestPosition ' + | ||
'setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr ' + | ||
'setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe ' + | ||
'setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag ' + | ||
'setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject ' + | ||
'setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets ' + | ||
'shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare ' + | ||
'shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField ' + | ||
'shortNameOf showHelp showHidden showManipCtx showSelectionInTitle ' + | ||
'showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface ' + | ||
'size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep ' + | ||
'snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound ' + | ||
'soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort ' + | ||
'spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString ' + | ||
'startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp ' + | ||
'stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex ' + | ||
'stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex ' + | ||
'stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString ' + | ||
'stringToStringArray strip stripPrefixFromName stroke subdAutoProjection ' + | ||
'subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV ' + | ||
'subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror ' + | ||
'subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease ' + | ||
'subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring ' + | ||
'surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton ' + | ||
'symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext ' + | ||
'texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext ' + | ||
'texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text ' + | ||
'textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList ' + | ||
'textToShelf textureDisplacePlane textureHairColor texturePlacementContext ' + | ||
'textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath ' + | ||
'toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower ' + | ||
'toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper ' + | ||
'trace track trackCtx transferAttributes transformCompare transformLimits translator ' + | ||
'trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence ' + | ||
'twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit ' + | ||
'unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink ' + | ||
'uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane ' + | ||
'viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex ' + | ||
'waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire ' + | ||
'wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform', | ||
illegal: '</', | ||
contains: [ | ||
hljs.C_NUMBER_MODE, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'string', | ||
begin: '`', end: '`', | ||
contains: [hljs.BACKSLASH_ESCAPE] | ||
}, | ||
{ | ||
className: 'variable', | ||
begin: '\\$\\d', | ||
relevance: 5 | ||
}, | ||
{ | ||
className: 'variable', | ||
begin: '[\\$\\%\\@\\*](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)' | ||
}, | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE | ||
] | ||
}; | ||
}; |
30
nginx.js
@@ -79,19 +79,17 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
contains: [ | ||
hljs.HASH_COMMENT_MODE, | ||
{ | ||
begin: hljs.UNDERSCORE_IDENT_RE + '\\s', end: ';|{', returnBegin: true, | ||
contains: [ | ||
{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE, | ||
starts: DEFAULT | ||
} | ||
] | ||
} | ||
], | ||
illegal: '[^\\s\\}]' | ||
} | ||
contains: [ | ||
hljs.HASH_COMMENT_MODE, | ||
{ | ||
begin: hljs.UNDERSCORE_IDENT_RE + '\\s', end: ';|{', returnBegin: true, | ||
contains: [ | ||
{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE, | ||
starts: DEFAULT | ||
} | ||
] | ||
} | ||
], | ||
illegal: '[^\\s\\}]' | ||
}; | ||
}; |
@@ -29,57 +29,55 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: OBJC_KEYWORDS, | ||
illegal: '</', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.C_NUMBER_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'string', | ||
begin: '\'', | ||
end: '[^\\\\]\'', | ||
illegal: '[^\\\\][^\']' | ||
}, | ||
keywords: OBJC_KEYWORDS, | ||
illegal: '</', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.C_NUMBER_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'string', | ||
begin: '\'', | ||
end: '[^\\\\]\'', | ||
illegal: '[^\\\\][^\']' | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#import', | ||
end: '$', | ||
contains: [ | ||
{ | ||
className: 'preprocessor', | ||
begin: '#import', | ||
end: '$', | ||
contains: [ | ||
{ | ||
className: 'title', | ||
begin: '\"', | ||
end: '\"' | ||
}, | ||
{ | ||
className: 'title', | ||
begin: '<', | ||
end: '>' | ||
} | ||
] | ||
className: 'title', | ||
begin: '\"', | ||
end: '\"' | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#', | ||
end: '$' | ||
}, | ||
{ | ||
className: 'class', | ||
beginWithKeyword: true, | ||
end: '({|$)', | ||
keywords: 'interface class protocol implementation', | ||
contains: [{ | ||
className: 'id', | ||
begin: hljs.UNDERSCORE_IDENT_RE | ||
} | ||
] | ||
}, | ||
{ | ||
className: 'variable', | ||
begin: '\\.'+hljs.UNDERSCORE_IDENT_RE | ||
className: 'title', | ||
begin: '<', | ||
end: '>' | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#', | ||
end: '$' | ||
}, | ||
{ | ||
className: 'class', | ||
beginWithKeyword: true, | ||
end: '({|$)', | ||
keywords: 'interface class protocol implementation', | ||
contains: [{ | ||
className: 'id', | ||
begin: hljs.UNDERSCORE_IDENT_RE | ||
} | ||
] | ||
}, | ||
{ | ||
className: 'variable', | ||
begin: '\\.'+hljs.UNDERSCORE_IDENT_RE | ||
} | ||
] | ||
}; | ||
}; |
@@ -226,2 +226,10 @@ { | ||
"email": "casey.duncan@gmail.com" | ||
}, | ||
{ | ||
"name": "Eugene Nizhibitsky", | ||
"email": "nizhibitsky@gmail.com" | ||
}, | ||
{ | ||
"name": "Alberto Gimeno", | ||
"email": "gimenete@gmail.com" | ||
} | ||
@@ -245,3 +253,3 @@ ], | ||
], | ||
"version": "7.1.0", | ||
"version": "7.2.0", | ||
"scripts": {}, | ||
@@ -248,0 +256,0 @@ "keywords": [ |
module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
subLanguage: 'xml', | ||
contains: [ | ||
{ | ||
className: 'comment', | ||
begin: '^#', end: '$' | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '\\^rem{', end: '}', | ||
relevance: 10, | ||
contains: [ | ||
{ | ||
begin: '{', end: '}', | ||
contains: ['self'] | ||
} | ||
] | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
begin: '^@(?:BASE|USE|CLASS|OPTIONS)$', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'title', | ||
begin: '@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$' | ||
}, | ||
{ | ||
className: 'variable', | ||
begin: '\\$\\{?[\\w\\-\\.\\:]+\\}?' | ||
}, | ||
{ | ||
className: 'keyword', | ||
begin: '\\^[\\w\\-\\.\\:]+' | ||
}, | ||
{ | ||
className: 'number', | ||
begin: '\\^#[0-9a-fA-F]+' | ||
}, | ||
hljs.C_NUMBER_MODE | ||
] | ||
} | ||
subLanguage: 'xml', | ||
contains: [ | ||
{ | ||
className: 'comment', | ||
begin: '^#', end: '$' | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '\\^rem{', end: '}', | ||
relevance: 10, | ||
contains: [ | ||
{ | ||
begin: '{', end: '}', | ||
contains: ['self'] | ||
} | ||
] | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
begin: '^@(?:BASE|USE|CLASS|OPTIONS)$', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'title', | ||
begin: '@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$' | ||
}, | ||
{ | ||
className: 'variable', | ||
begin: '\\$\\{?[\\w\\-\\.\\:]+\\}?' | ||
}, | ||
{ | ||
className: 'keyword', | ||
begin: '\\^[\\w\\-\\.\\:]+' | ||
}, | ||
{ | ||
className: 'number', | ||
begin: '\\^#[0-9a-fA-F]+' | ||
}, | ||
hljs.C_NUMBER_MODE | ||
] | ||
}; | ||
}; |
@@ -161,7 +161,5 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: PERL_KEYWORDS, | ||
contains: PERL_DEFAULT_CONTAINS | ||
} | ||
keywords: PERL_KEYWORDS, | ||
contains: PERL_DEFAULT_CONTAINS | ||
}; | ||
}; |
150
php.js
@@ -28,80 +28,78 @@ module.exports = function(hljs) { | ||
case_insensitive: true, | ||
defaultMode: { | ||
keywords: | ||
'and include_once list abstract global private echo interface as static endswitch ' + | ||
'array null if endwhile or const for endforeach self var while isset public ' + | ||
'protected exit foreach throw elseif include __FILE__ empty require_once do xor ' + | ||
'return implements parent clone use __CLASS__ __LINE__ else break print eval new ' + | ||
'catch __METHOD__ case exception php_user_filter default die require __FUNCTION__ ' + | ||
'enddeclare final try this switch continue endfor endif declare unset true false ' + | ||
'namespace trait goto instanceof insteadof __DIR__ __NAMESPACE__ __halt_compiler', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.HASH_COMMENT_MODE, | ||
{ | ||
keywords: | ||
'and include_once list abstract global private echo interface as static endswitch ' + | ||
'array null if endwhile or const for endforeach self var while isset public ' + | ||
'protected exit foreach throw elseif include __FILE__ empty require_once do xor ' + | ||
'return implements parent clone use __CLASS__ __LINE__ else break print eval new ' + | ||
'catch __METHOD__ case exception php_user_filter default die require __FUNCTION__ ' + | ||
'enddeclare final try this switch continue endfor endif declare unset true false ' + | ||
'namespace trait goto instanceof insteadof __DIR__ __NAMESPACE__ __halt_compiler', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.HASH_COMMENT_MODE, | ||
{ | ||
className: 'comment', | ||
begin: '/\\*', end: '\\*/', | ||
contains: [{ | ||
className: 'phpdoc', | ||
begin: '\\s@[A-Za-z]+' | ||
}] | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '/\\*', end: '\\*/', | ||
contains: [{ | ||
className: 'phpdoc', | ||
begin: '\\s@[A-Za-z]+' | ||
}] | ||
}, | ||
{ | ||
className: 'comment', | ||
excludeBegin: true, | ||
begin: '__halt_compiler.+?;', endsWithParent: true | ||
}, | ||
{ | ||
className: 'string', | ||
begin: '<<<[\'"]?\\w+[\'"]?$', end: '^\\w+;', | ||
contains: [hljs.BACKSLASH_ESCAPE] | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
begin: '<\\?php', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
begin: '\\?>' | ||
}, | ||
VARIABLE, | ||
{ | ||
className: 'function', | ||
beginWithKeyword: true, end: '{', | ||
keywords: 'function', | ||
illegal: '\\$|\\[|%', | ||
contains: [ | ||
TITLE, | ||
{ | ||
className: 'params', | ||
begin: '\\(', end: '\\)', | ||
contains: [ | ||
'self', | ||
VARIABLE, | ||
hljs.C_BLOCK_COMMENT_MODE | ||
].concat(STRINGS).concat(NUMBERS) | ||
} | ||
] | ||
}, | ||
{ | ||
className: 'class', | ||
beginWithKeyword: true, end: '{', | ||
keywords: 'class', | ||
illegal: '[:\\(\\$]', | ||
contains: [ | ||
{ | ||
beginWithKeyword: true, endsWithParent: true, | ||
keywords: 'extends', | ||
contains: [TITLE] | ||
}, | ||
TITLE | ||
] | ||
}, | ||
{ | ||
begin: '=>' // No markup, just a relevance booster | ||
} | ||
].concat(STRINGS).concat(NUMBERS) | ||
} | ||
excludeBegin: true, | ||
begin: '__halt_compiler.+?;', endsWithParent: true | ||
}, | ||
{ | ||
className: 'string', | ||
begin: '<<<[\'"]?\\w+[\'"]?$', end: '^\\w+;', | ||
contains: [hljs.BACKSLASH_ESCAPE] | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
begin: '<\\?php', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
begin: '\\?>' | ||
}, | ||
VARIABLE, | ||
{ | ||
className: 'function', | ||
beginWithKeyword: true, end: '{', | ||
keywords: 'function', | ||
illegal: '\\$|\\[|%', | ||
contains: [ | ||
TITLE, | ||
{ | ||
className: 'params', | ||
begin: '\\(', end: '\\)', | ||
contains: [ | ||
'self', | ||
VARIABLE, | ||
hljs.C_BLOCK_COMMENT_MODE | ||
].concat(STRINGS).concat(NUMBERS) | ||
} | ||
] | ||
}, | ||
{ | ||
className: 'class', | ||
beginWithKeyword: true, end: '{', | ||
keywords: 'class', | ||
illegal: '[:\\(\\$]', | ||
contains: [ | ||
{ | ||
beginWithKeyword: true, endsWithParent: true, | ||
keywords: 'extends', | ||
contains: [TITLE] | ||
}, | ||
TITLE | ||
] | ||
}, | ||
{ | ||
begin: '=>' // No markup, just a relevance booster | ||
} | ||
].concat(STRINGS).concat(NUMBERS) | ||
}; | ||
}; |
module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
contains: [ | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'builtin', | ||
begin: '{', end: '}$', | ||
excludeBegin: true, excludeEnd: true, | ||
contains: [hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE], | ||
contains: [ | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'builtin', | ||
begin: '{', end: '}$', | ||
excludeBegin: true, excludeEnd: true, | ||
contains: [hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE], | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'filename', | ||
begin: '[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}', end: ':', | ||
excludeEnd: true | ||
}, | ||
{ | ||
className: 'header', | ||
begin: '(ncalls|tottime|cumtime)', end: '$', | ||
keywords: 'ncalls tottime|10 cumtime|10 filename', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'summary', | ||
begin: 'function calls', end: '$', | ||
contains: [hljs.C_NUMBER_MODE], | ||
relevance: 10 | ||
}, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'function', | ||
begin: '\\(', end: '\\)$', | ||
contains: [{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE, | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'filename', | ||
begin: '[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}', end: ':', | ||
excludeEnd: true | ||
}, | ||
{ | ||
className: 'header', | ||
begin: '(ncalls|tottime|cumtime)', end: '$', | ||
keywords: 'ncalls tottime|10 cumtime|10 filename', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'summary', | ||
begin: 'function calls', end: '$', | ||
contains: [hljs.C_NUMBER_MODE], | ||
relevance: 10 | ||
}, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
{ | ||
className: 'function', | ||
begin: '\\(', end: '\\)$', | ||
contains: [{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE, | ||
relevance: 0 | ||
}], | ||
relevance: 0 | ||
} | ||
] | ||
} | ||
}], | ||
relevance: 0 | ||
} | ||
] | ||
}; | ||
}; |
@@ -55,27 +55,25 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: { | ||
keyword: | ||
'and elif is global as in if from raise for except finally print import pass return ' + | ||
'exec else break not with class assert yield try while continue del or def lambda ' + | ||
'nonlocal|10', | ||
built_in: | ||
'None True False Ellipsis NotImplemented' | ||
keywords: { | ||
keyword: | ||
'and elif is global as in if from raise for except finally print import pass return ' + | ||
'exec else break not with class assert yield try while continue del or def lambda ' + | ||
'nonlocal|10', | ||
built_in: | ||
'None True False Ellipsis NotImplemented' | ||
}, | ||
illegal: '(</|->|\\?)', | ||
contains: STRINGS.concat([ | ||
hljs.HASH_COMMENT_MODE, | ||
hljs.inherit(FUNC_CLASS_PROTO, {className: 'function', keywords: 'def'}), | ||
hljs.inherit(FUNC_CLASS_PROTO, {className: 'class', keywords: 'class'}), | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'decorator', | ||
begin: '@', end: '$' | ||
}, | ||
illegal: '(</|->|\\?)', | ||
contains: STRINGS.concat([ | ||
hljs.HASH_COMMENT_MODE, | ||
hljs.inherit(FUNC_CLASS_PROTO, {className: 'function', keywords: 'def'}), | ||
hljs.inherit(FUNC_CLASS_PROTO, {className: 'class', keywords: 'class'}), | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'decorator', | ||
begin: '@', end: '$' | ||
}, | ||
{ | ||
begin: '\\b(print|exec)\\(' // don’t highlight keywords-turned-functions in Python 3 | ||
} | ||
]) | ||
} | ||
{ | ||
begin: '\\b(print|exec)\\(' // don’t highlight keywords-turned-functions in Python 3 | ||
} | ||
]) | ||
}; | ||
}; |
134
r.js
@@ -5,74 +5,72 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
contains: [ | ||
hljs.HASH_COMMENT_MODE, | ||
{ | ||
begin: IDENT_RE, | ||
lexems: IDENT_RE, | ||
keywords: { | ||
keyword: | ||
'function if in break next repeat else for return switch while try tryCatch|10 ' + | ||
'stop warning require library attach detach source setMethod setGeneric ' + | ||
'setGroupGeneric setClass ...|10', | ||
literal: | ||
'NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 ' + | ||
'NA_complex_|10' | ||
}, | ||
relevance: 0 | ||
contains: [ | ||
hljs.HASH_COMMENT_MODE, | ||
{ | ||
begin: IDENT_RE, | ||
lexems: IDENT_RE, | ||
keywords: { | ||
keyword: | ||
'function if in break next repeat else for return switch while try tryCatch|10 ' + | ||
'stop warning require library attach detach source setMethod setGeneric ' + | ||
'setGroupGeneric setClass ...|10', | ||
literal: | ||
'NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 ' + | ||
'NA_complex_|10' | ||
}, | ||
{ | ||
// hex value | ||
className: 'number', | ||
begin: "0[xX][0-9a-fA-F]+[Li]?\\b", | ||
relevance: 0 | ||
}, | ||
{ | ||
// explicit integer | ||
className: 'number', | ||
begin: "\\d+(?:[eE][+\\-]?\\d*)?L\\b", | ||
relevance: 0 | ||
}, | ||
{ | ||
// number with trailing decimal | ||
className: 'number', | ||
begin: "\\d+\\.(?!\\d)(?:i\\b)?", | ||
relevance: 0 | ||
}, | ||
{ | ||
// number | ||
className: 'number', | ||
begin: "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b", | ||
relevance: 0 | ||
}, | ||
{ | ||
// number with leading decimal | ||
className: 'number', | ||
begin: "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b", | ||
relevance: 0 | ||
}, | ||
relevance: 0 | ||
}, | ||
{ | ||
// hex value | ||
className: 'number', | ||
begin: "0[xX][0-9a-fA-F]+[Li]?\\b", | ||
relevance: 0 | ||
}, | ||
{ | ||
// explicit integer | ||
className: 'number', | ||
begin: "\\d+(?:[eE][+\\-]?\\d*)?L\\b", | ||
relevance: 0 | ||
}, | ||
{ | ||
// number with trailing decimal | ||
className: 'number', | ||
begin: "\\d+\\.(?!\\d)(?:i\\b)?", | ||
relevance: 0 | ||
}, | ||
{ | ||
// number | ||
className: 'number', | ||
begin: "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b", | ||
relevance: 0 | ||
}, | ||
{ | ||
// number with leading decimal | ||
className: 'number', | ||
begin: "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b", | ||
relevance: 0 | ||
}, | ||
{ | ||
// escaped identifier | ||
begin: '`', | ||
end: '`', | ||
relevance: 0 | ||
}, | ||
{ | ||
// escaped identifier | ||
begin: '`', | ||
end: '`', | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'string', | ||
begin: '"', | ||
end: '"', | ||
contains: [hljs.BACKSLASH_ESCAPE], | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'string', | ||
begin: "'", | ||
end: "'", | ||
contains: [hljs.BACKSLASH_ESCAPE], | ||
relevance: 0 | ||
} | ||
] | ||
} | ||
{ | ||
className: 'string', | ||
begin: '"', | ||
end: '"', | ||
contains: [hljs.BACKSLASH_ESCAPE], | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'string', | ||
begin: "'", | ||
end: "'", | ||
contains: [hljs.BACKSLASH_ESCAPE], | ||
relevance: 0 | ||
} | ||
] | ||
}; | ||
}; |
46
rib.js
module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: | ||
'ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis ' + | ||
'Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone ' + | ||
'CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail ' + | ||
'DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format ' + | ||
'FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry ' + | ||
'Hider Hyperboloid Identity Illuminate Imager Interior LightSource ' + | ||
'MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte ' + | ||
'MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option ' + | ||
'Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples ' + | ||
'PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection ' + | ||
'Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ' + | ||
'ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere ' + | ||
'SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd ' + | ||
'TransformPoints Translate TrimCurve WorldBegin WorldEnd', | ||
illegal: '</', | ||
contains: [ | ||
hljs.HASH_COMMENT_MODE, | ||
hljs.C_NUMBER_MODE, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE | ||
] | ||
} | ||
keywords: | ||
'ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis ' + | ||
'Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone ' + | ||
'CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail ' + | ||
'DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format ' + | ||
'FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry ' + | ||
'Hider Hyperboloid Identity Illuminate Imager Interior LightSource ' + | ||
'MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte ' + | ||
'MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option ' + | ||
'Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples ' + | ||
'PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection ' + | ||
'Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ' + | ||
'ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere ' + | ||
'SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd ' + | ||
'TransformPoints Translate TrimCurve WorldBegin WorldEnd', | ||
illegal: '</', | ||
contains: [ | ||
hljs.HASH_COMMENT_MODE, | ||
hljs.C_NUMBER_MODE, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE | ||
] | ||
}; | ||
}; |
68
rsl.js
module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: { | ||
keyword: | ||
'float color point normal vector matrix while for if do return else break extern continue', | ||
built_in: | ||
'abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise ' + | ||
'clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp ' + | ||
'faceforward filterstep floor format fresnel incident length lightsource log match ' + | ||
'max min mod noise normalize ntransform opposite option phong pnoise pow printf ' + | ||
'ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp ' + | ||
'setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan ' + | ||
'texture textureinfo trace transform vtransform xcomp ycomp zcomp' | ||
keywords: { | ||
keyword: | ||
'float color point normal vector matrix while for if do return else break extern continue', | ||
built_in: | ||
'abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise ' + | ||
'clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp ' + | ||
'faceforward filterstep floor format fresnel incident length lightsource log match ' + | ||
'max min mod noise normalize ntransform opposite option phong pnoise pow printf ' + | ||
'ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp ' + | ||
'setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan ' + | ||
'texture textureinfo trace transform vtransform xcomp ycomp zcomp' | ||
}, | ||
illegal: '</', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.APOS_STRING_MODE, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#', end: '$' | ||
}, | ||
illegal: '</', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.APOS_STRING_MODE, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#', end: '$' | ||
}, | ||
{ | ||
className: 'shader', | ||
beginWithKeyword: true, end: '\\(', | ||
keywords: 'surface displacement light volume imager' | ||
}, | ||
{ | ||
className: 'shading', | ||
beginWithKeyword: true, end: '\\(', | ||
keywords: 'illuminate illuminance gather' | ||
} | ||
] | ||
} | ||
{ | ||
className: 'shader', | ||
beginWithKeyword: true, end: '\\(', | ||
keywords: 'surface displacement light volume imager' | ||
}, | ||
{ | ||
className: 'shading', | ||
beginWithKeyword: true, end: '\\(', | ||
keywords: 'illuminate illuminance gather' | ||
} | ||
] | ||
}; | ||
}; |
@@ -180,8 +180,6 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
lexems: RUBY_IDENT_RE, | ||
keywords: RUBY_KEYWORDS, | ||
contains: RUBY_DEFAULT_CONTAINS | ||
} | ||
lexems: RUBY_IDENT_RE, | ||
keywords: RUBY_KEYWORDS, | ||
contains: RUBY_DEFAULT_CONTAINS | ||
}; | ||
}; |
64
rust.js
@@ -23,36 +23,34 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: KEYWORDS, | ||
illegal: '</', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
QUOTE_STRING, | ||
hljs.APOS_STRING_MODE, | ||
NUMBER, | ||
{ | ||
className: 'function', | ||
beginWithKeyword: true, end: '(\\(|<)', | ||
keywords: 'fn', | ||
contains: [TITLE] | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#\\[', end: '\\]' | ||
}, | ||
{ | ||
beginWithKeyword: true, end: '(=|<)', | ||
keywords: 'type', | ||
contains: [TITLE], | ||
illegal: '\\S' | ||
}, | ||
{ | ||
beginWithKeyword: true, end: '({|<)', | ||
keywords: 'iface enum', | ||
contains: [TITLE], | ||
illegal: '\\S' | ||
} | ||
] | ||
} | ||
keywords: KEYWORDS, | ||
illegal: '</', | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
QUOTE_STRING, | ||
hljs.APOS_STRING_MODE, | ||
NUMBER, | ||
{ | ||
className: 'function', | ||
beginWithKeyword: true, end: '(\\(|<)', | ||
keywords: 'fn', | ||
contains: [TITLE] | ||
}, | ||
{ | ||
className: 'preprocessor', | ||
begin: '#\\[', end: '\\]' | ||
}, | ||
{ | ||
beginWithKeyword: true, end: '(=|<)', | ||
keywords: 'type', | ||
contains: [TITLE], | ||
illegal: '\\S' | ||
}, | ||
{ | ||
beginWithKeyword: true, end: '({|<)', | ||
keywords: 'iface enum', | ||
contains: [TITLE], | ||
illegal: '\\S' | ||
} | ||
] | ||
}; | ||
}; |
90
scala.js
@@ -11,49 +11,47 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: | ||
'type yield lazy override def with val var false true sealed abstract private trait ' + | ||
'object null if for while throw finally protected extends import final return else ' + | ||
'break new catch super class case package default try this match continue throws', | ||
contains: [ | ||
{ | ||
className: 'javadoc', | ||
begin: '/\\*\\*', end: '\\*/', | ||
contains: [{ | ||
className: 'javadoctag', | ||
begin: '@[A-Za-z]+' | ||
}], | ||
relevance: 10 | ||
}, | ||
hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, STRING, | ||
{ | ||
className: 'class', | ||
begin: '((case )?class |object |trait )', end: '({|$)', // beginWithKeyword won't work because a single "case" shouldn't start this mode | ||
illegal: ':', | ||
keywords: 'case class trait object', | ||
contains: [ | ||
{ | ||
beginWithKeyword: true, | ||
keywords: 'extends with', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE | ||
}, | ||
{ | ||
className: 'params', | ||
begin: '\\(', end: '\\)', | ||
contains: [ | ||
hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, STRING, | ||
ANNOTATION | ||
] | ||
} | ||
] | ||
}, | ||
hljs.C_NUMBER_MODE, | ||
ANNOTATION | ||
] | ||
} | ||
keywords: | ||
'type yield lazy override def with val var false true sealed abstract private trait ' + | ||
'object null if for while throw finally protected extends import final return else ' + | ||
'break new catch super class case package default try this match continue throws', | ||
contains: [ | ||
{ | ||
className: 'javadoc', | ||
begin: '/\\*\\*', end: '\\*/', | ||
contains: [{ | ||
className: 'javadoctag', | ||
begin: '@[A-Za-z]+' | ||
}], | ||
relevance: 10 | ||
}, | ||
hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, | ||
hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, STRING, | ||
{ | ||
className: 'class', | ||
begin: '((case )?class |object |trait )', end: '({|$)', // beginWithKeyword won't work because a single "case" shouldn't start this mode | ||
illegal: ':', | ||
keywords: 'case class trait object', | ||
contains: [ | ||
{ | ||
beginWithKeyword: true, | ||
keywords: 'extends with', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE | ||
}, | ||
{ | ||
className: 'params', | ||
begin: '\\(', end: '\\)', | ||
contains: [ | ||
hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, STRING, | ||
ANNOTATION | ||
] | ||
} | ||
] | ||
}, | ||
hljs.C_NUMBER_MODE, | ||
ANNOTATION | ||
] | ||
}; | ||
}; |
@@ -12,40 +12,38 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: 'self super nil true false thisContext', // only 6 | ||
contains: [ | ||
{ | ||
className: 'comment', | ||
begin: '"', end: '"', | ||
relevance: 0 | ||
}, | ||
hljs.APOS_STRING_MODE, | ||
{ | ||
className: 'class', | ||
begin: '\\b[A-Z][A-Za-z0-9_]*', | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'method', | ||
begin: VAR_IDENT_RE + ':' | ||
}, | ||
hljs.C_NUMBER_MODE, | ||
SYMBOL, | ||
CHAR, | ||
{ | ||
className: 'localvars', | ||
begin: '\\|\\s*((' + VAR_IDENT_RE + ')\\s*)+\\|' | ||
}, | ||
{ | ||
className: 'array', | ||
begin: '\\#\\(', end: '\\)', | ||
contains: [ | ||
hljs.APOS_STRING_MODE, | ||
CHAR, | ||
hljs.C_NUMBER_MODE, | ||
SYMBOL | ||
] | ||
} | ||
] | ||
} | ||
keywords: 'self super nil true false thisContext', // only 6 | ||
contains: [ | ||
{ | ||
className: 'comment', | ||
begin: '"', end: '"', | ||
relevance: 0 | ||
}, | ||
hljs.APOS_STRING_MODE, | ||
{ | ||
className: 'class', | ||
begin: '\\b[A-Z][A-Za-z0-9_]*', | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'method', | ||
begin: VAR_IDENT_RE + ':' | ||
}, | ||
hljs.C_NUMBER_MODE, | ||
SYMBOL, | ||
CHAR, | ||
{ | ||
className: 'localvars', | ||
begin: '\\|\\s*((' + VAR_IDENT_RE + ')\\s*)+\\|' | ||
}, | ||
{ | ||
className: 'array', | ||
begin: '\\#\\(', end: '\\)', | ||
contains: [ | ||
hljs.APOS_STRING_MODE, | ||
CHAR, | ||
hljs.C_NUMBER_MODE, | ||
SYMBOL | ||
] | ||
} | ||
] | ||
}; | ||
}; |
110
sql.js
module.exports = function(hljs) { | ||
return { | ||
case_insensitive: true, | ||
defaultMode: { | ||
illegal: '[^\\s]', | ||
contains: [ | ||
{ | ||
className: 'operator', | ||
begin: '(begin|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant)\\b', end: ';', endsWithParent: true, | ||
keywords: { | ||
keyword: 'all partial global month current_timestamp using go revoke smallint ' + | ||
'indicator end-exec disconnect zone with character assertion to add current_user ' + | ||
'usage input local alter match collate real then rollback get read timestamp ' + | ||
'session_user not integer bit unique day minute desc insert execute like ilike|2 ' + | ||
'level decimal drop continue isolation found where constraints domain right ' + | ||
'national some module transaction relative second connect escape close system_user ' + | ||
'for deferred section cast current sqlstate allocate intersect deallocate numeric ' + | ||
'public preserve full goto initially asc no key output collation group by union ' + | ||
'session both last language constraint column of space foreign deferrable prior ' + | ||
'connection unknown action commit view or first into float year primary cascaded ' + | ||
'except restrict set references names table outer open select size are rows from ' + | ||
'prepare distinct leading create only next inner authorization schema ' + | ||
'corresponding option declare precision immediate else timezone_minute external ' + | ||
'varying translation true case exception join hour default double scroll value ' + | ||
'cursor descriptor values dec fetch procedure delete and false int is describe ' + | ||
'char as at in varchar null trailing any absolute current_time end grant ' + | ||
'privileges when cross check write current_date pad begin temporary exec time ' + | ||
'update catalog user sql date on identity timezone_hour natural whenever interval ' + | ||
'work order cascade diagnostics nchar having left call do handler load replace ' + | ||
'truncate start lock show pragma', | ||
aggregate: 'count sum min max avg' | ||
illegal: '[^\\s]', | ||
contains: [ | ||
{ | ||
className: 'operator', | ||
begin: '(begin|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant)\\b', end: ';', endsWithParent: true, | ||
keywords: { | ||
keyword: 'all partial global month current_timestamp using go revoke smallint ' + | ||
'indicator end-exec disconnect zone with character assertion to add current_user ' + | ||
'usage input local alter match collate real then rollback get read timestamp ' + | ||
'session_user not integer bit unique day minute desc insert execute like ilike|2 ' + | ||
'level decimal drop continue isolation found where constraints domain right ' + | ||
'national some module transaction relative second connect escape close system_user ' + | ||
'for deferred section cast current sqlstate allocate intersect deallocate numeric ' + | ||
'public preserve full goto initially asc no key output collation group by union ' + | ||
'session both last language constraint column of space foreign deferrable prior ' + | ||
'connection unknown action commit view or first into float year primary cascaded ' + | ||
'except restrict set references names table outer open select size are rows from ' + | ||
'prepare distinct leading create only next inner authorization schema ' + | ||
'corresponding option declare precision immediate else timezone_minute external ' + | ||
'varying translation true case exception join hour default double scroll value ' + | ||
'cursor descriptor values dec fetch procedure delete and false int is describe ' + | ||
'char as at in varchar null trailing any absolute current_time end grant ' + | ||
'privileges when cross check write current_date pad begin temporary exec time ' + | ||
'update catalog user sql date on identity timezone_hour natural whenever interval ' + | ||
'work order cascade diagnostics nchar having left call do handler load replace ' + | ||
'truncate start lock show pragma', | ||
aggregate: 'count sum min max avg' | ||
}, | ||
contains: [ | ||
{ | ||
className: 'string', | ||
begin: '\'', end: '\'', | ||
contains: [hljs.BACKSLASH_ESCAPE, {begin: '\'\''}], | ||
relevance: 0 | ||
}, | ||
contains: [ | ||
{ | ||
className: 'string', | ||
begin: '\'', end: '\'', | ||
contains: [hljs.BACKSLASH_ESCAPE, {begin: '\'\''}], | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'string', | ||
begin: '"', end: '"', | ||
contains: [hljs.BACKSLASH_ESCAPE, {begin: '""'}], | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'string', | ||
begin: '`', end: '`', | ||
contains: [hljs.BACKSLASH_ESCAPE] | ||
}, | ||
hljs.C_NUMBER_MODE | ||
] | ||
}, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{ | ||
className: 'comment', | ||
begin: '--', end: '$' | ||
} | ||
] | ||
} | ||
{ | ||
className: 'string', | ||
begin: '"', end: '"', | ||
contains: [hljs.BACKSLASH_ESCAPE, {begin: '""'}], | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'string', | ||
begin: '`', end: '`', | ||
contains: [hljs.BACKSLASH_ESCAPE] | ||
}, | ||
hljs.C_NUMBER_MODE | ||
] | ||
}, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{ | ||
className: 'comment', | ||
begin: '--', end: '$' | ||
} | ||
] | ||
}; | ||
}; |
70
tex.js
@@ -17,39 +17,37 @@ module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
contains: [ | ||
{ // parameter | ||
begin: '\\\\[a-zA-Zа-яА-я]+[\\*]? *= *-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?', | ||
returnBegin: true, | ||
contains: [ | ||
COMMAND1, COMMAND2, | ||
{ | ||
className: 'number', | ||
begin: ' *=', end: '-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?', | ||
excludeBegin: true | ||
} | ||
], | ||
relevance: 10 | ||
}, | ||
COMMAND1, COMMAND2, | ||
SPECIAL, | ||
{ | ||
className: 'formula', | ||
begin: '\\$\\$', end: '\\$\\$', | ||
contains: [COMMAND1, COMMAND2, SPECIAL], | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'formula', | ||
begin: '\\$', end: '\\$', | ||
contains: [COMMAND1, COMMAND2, SPECIAL], | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '%', end: '$', | ||
relevance: 0 | ||
} | ||
] | ||
} | ||
contains: [ | ||
{ // parameter | ||
begin: '\\\\[a-zA-Zа-яА-я]+[\\*]? *= *-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?', | ||
returnBegin: true, | ||
contains: [ | ||
COMMAND1, COMMAND2, | ||
{ | ||
className: 'number', | ||
begin: ' *=', end: '-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?', | ||
excludeBegin: true | ||
} | ||
], | ||
relevance: 10 | ||
}, | ||
COMMAND1, COMMAND2, | ||
SPECIAL, | ||
{ | ||
className: 'formula', | ||
begin: '\\$\\$', end: '\\$\\$', | ||
contains: [COMMAND1, COMMAND2, SPECIAL], | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'formula', | ||
begin: '\\$', end: '\\$', | ||
contains: [COMMAND1, COMMAND2, SPECIAL], | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '%', end: '$', | ||
relevance: 0 | ||
} | ||
] | ||
}; | ||
}; |
114
vala.js
module.exports = function(hljs) { | ||
return { | ||
defaultMode: { | ||
keywords: { | ||
keyword: | ||
// Value types | ||
'char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 ' + | ||
'uint16 uint32 uint64 float double bool struct enum string void ' + | ||
// Reference types | ||
'weak unowned owned ' + | ||
// Modifiers | ||
'async signal static abstract interface override ' + | ||
// Control Structures | ||
'while do for foreach else switch case break default return try catch ' + | ||
// Visibility | ||
'public private protected internal ' + | ||
// Other | ||
'using new this get set const stdout stdin stderr var', | ||
built_in: | ||
'DBus GLib CCode Gee Object', | ||
literal: | ||
'false true null' | ||
keywords: { | ||
keyword: | ||
// Value types | ||
'char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 ' + | ||
'uint16 uint32 uint64 float double bool struct enum string void ' + | ||
// Reference types | ||
'weak unowned owned ' + | ||
// Modifiers | ||
'async signal static abstract interface override ' + | ||
// Control Structures | ||
'while do for foreach else switch case break default return try catch ' + | ||
// Visibility | ||
'public private protected internal ' + | ||
// Other | ||
'using new this get set const stdout stdin stderr var', | ||
built_in: | ||
'DBus GLib CCode Gee Object', | ||
literal: | ||
'false true null' | ||
}, | ||
contains: [ | ||
{ | ||
className: 'class', | ||
beginWithKeyword: true, end: '{', | ||
keywords: 'class interface delegate namespace', | ||
contains: [ | ||
{ | ||
beginWithKeyword: true, | ||
keywords: 'extends implements' | ||
}, | ||
{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE | ||
} | ||
] | ||
}, | ||
contains: [ | ||
{ | ||
className: 'class', | ||
beginWithKeyword: true, end: '{', | ||
keywords: 'class interface delegate namespace', | ||
contains: [ | ||
{ | ||
beginWithKeyword: true, | ||
keywords: 'extends implements' | ||
}, | ||
{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE | ||
} | ||
] | ||
}, | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{ | ||
className: 'string', | ||
begin: '"""', end: '"""', | ||
relevance: 5 | ||
}, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'preprocessor', | ||
begin: '^#', end: '$', | ||
relevance: 2 | ||
}, | ||
{ | ||
className: 'constant', | ||
begin: ' [A-Z_]+ ', | ||
relevance: 0 | ||
} | ||
] | ||
} | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{ | ||
className: 'string', | ||
begin: '"""', end: '"""', | ||
relevance: 5 | ||
}, | ||
hljs.APOS_STRING_MODE, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'preprocessor', | ||
begin: '^#', end: '$', | ||
relevance: 2 | ||
}, | ||
{ | ||
className: 'constant', | ||
begin: ' [A-Z_]+ ', | ||
relevance: 0 | ||
} | ||
] | ||
}; | ||
}; |
module.exports = function(hljs) { | ||
return { | ||
case_insensitive: true, | ||
defaultMode: { | ||
keywords: { | ||
keyword: | ||
'call class const dim do loop erase execute executeglobal exit for each next function ' + | ||
'if then else on error option explicit new private property let get public randomize ' + | ||
'redim rem select case set stop sub while wend with end to elseif is or xor and not ' + | ||
'class_initialize class_terminate default preserve in me byval byref step resume goto', | ||
built_in: | ||
'lcase month vartype instrrev ubound setlocale getobject rgb getref string ' + | ||
'weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency ' + | ||
'conversions csng timevalue second year space abs clng timeserial fixs len asc ' + | ||
'isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate ' + | ||
'instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex ' + | ||
'chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim ' + | ||
'strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion ' + | ||
'scriptengine split scriptengineminorversion cint sin datepart ltrim sqr ' + | ||
'scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw ' + | ||
'chrw regexp server response request cstr err', | ||
literal: | ||
'true false null nothing empty' | ||
keywords: { | ||
keyword: | ||
'call class const dim do loop erase execute executeglobal exit for each next function ' + | ||
'if then else on error option explicit new private property let get public randomize ' + | ||
'redim rem select case set stop sub while wend with end to elseif is or xor and not ' + | ||
'class_initialize class_terminate default preserve in me byval byref step resume goto', | ||
built_in: | ||
'lcase month vartype instrrev ubound setlocale getobject rgb getref string ' + | ||
'weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency ' + | ||
'conversions csng timevalue second year space abs clng timeserial fixs len asc ' + | ||
'isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate ' + | ||
'instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex ' + | ||
'chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim ' + | ||
'strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion ' + | ||
'scriptengine split scriptengineminorversion cint sin datepart ltrim sqr ' + | ||
'scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw ' + | ||
'chrw regexp server response request cstr err', | ||
literal: | ||
'true false null nothing empty' | ||
}, | ||
illegal: '//', | ||
contains: [ | ||
{ // can’t use standard QUOTE_STRING_MODE since it’s compiled with its own escape and doesn’t use the local one | ||
className: 'string', | ||
begin: '"', end: '"', | ||
illegal: '\\n', | ||
contains: [{begin: '""'}], | ||
relevance: 0 | ||
}, | ||
illegal: '//', | ||
contains: [ | ||
{ // can’t use standard QUOTE_STRING_MODE since it’s compiled with its own escape and doesn’t use the local one | ||
className: 'string', | ||
begin: '"', end: '"', | ||
illegal: '\\n', | ||
contains: [{begin: '""'}], | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '\'', end: '$' | ||
}, | ||
hljs.C_NUMBER_MODE | ||
] | ||
} | ||
{ | ||
className: 'comment', | ||
begin: '\'', end: '$' | ||
}, | ||
hljs.C_NUMBER_MODE | ||
] | ||
}; | ||
}; |
76
vhdl.js
module.exports = function(hljs) { | ||
return { | ||
case_insensitive: true, | ||
defaultMode: { | ||
keywords: { | ||
keyword: | ||
'abs access after alias all and architecture array assert attribute begin block ' + | ||
'body buffer bus case component configuration constant context cover disconnect ' + | ||
'downto default else elsif end entity exit fairness file for force function generate ' + | ||
'generic group guarded if impure in inertial inout is label library linkage literal ' + | ||
'loop map mod nand new next nor not null of on open or others out package port ' + | ||
'postponed procedure process property protected pure range record register reject ' + | ||
'release rem report restrict restrict_guarantee return rol ror select sequence ' + | ||
'severity shared signal sla sll sra srl strong subtype then to transport type ' + | ||
'unaffected units until use variable vmode vprop vunit wait when while with xnor xor', | ||
typename: | ||
'boolean bit character severity_level integer time delay_length natural positive ' + | ||
'string bit_vector file_open_kind file_open_status std_ulogic std_ulogic_vector ' + | ||
'std_logic std_logic_vector unsigned signed boolean_vector integer_vector ' + | ||
'real_vector time_vector' | ||
keywords: { | ||
keyword: | ||
'abs access after alias all and architecture array assert attribute begin block ' + | ||
'body buffer bus case component configuration constant context cover disconnect ' + | ||
'downto default else elsif end entity exit fairness file for force function generate ' + | ||
'generic group guarded if impure in inertial inout is label library linkage literal ' + | ||
'loop map mod nand new next nor not null of on open or others out package port ' + | ||
'postponed procedure process property protected pure range record register reject ' + | ||
'release rem report restrict restrict_guarantee return rol ror select sequence ' + | ||
'severity shared signal sla sll sra srl strong subtype then to transport type ' + | ||
'unaffected units until use variable vmode vprop vunit wait when while with xnor xor', | ||
typename: | ||
'boolean bit character severity_level integer time delay_length natural positive ' + | ||
'string bit_vector file_open_kind file_open_status std_ulogic std_ulogic_vector ' + | ||
'std_logic std_logic_vector unsigned signed boolean_vector integer_vector ' + | ||
'real_vector time_vector' | ||
}, | ||
illegal: '{', | ||
contains: [ | ||
hljs.C_BLOCK_COMMENT_MODE, // VHDL-2008 block commenting. | ||
{ | ||
className: 'comment', | ||
begin: '--', end: '$' | ||
}, | ||
illegal: '{', | ||
contains: [ | ||
hljs.C_BLOCK_COMMENT_MODE, // VHDL-2008 block commenting. | ||
{ | ||
className: 'comment', | ||
begin: '--', end: '$' | ||
}, | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'literal', | ||
begin: '\'(U|X|0|1|Z|W|L|H|-)\'', | ||
contains: [hljs.BACKSLASH_ESCAPE] | ||
}, | ||
{ | ||
className: 'attribute', | ||
begin: '\'[A-Za-z](_?[A-Za-z0-9])*', | ||
contains: [hljs.BACKSLASH_ESCAPE] | ||
} | ||
] | ||
} // defaultMode | ||
} // return; | ||
hljs.QUOTE_STRING_MODE, | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'literal', | ||
begin: '\'(U|X|0|1|Z|W|L|H|-)\'', | ||
contains: [hljs.BACKSLASH_ESCAPE] | ||
}, | ||
{ | ||
className: 'attribute', | ||
begin: '\'[A-Za-z](_?[A-Za-z0-9])*', | ||
contains: [hljs.BACKSLASH_ESCAPE] | ||
} | ||
] | ||
}; // return | ||
}; |
128
xml.js
@@ -36,69 +36,67 @@ module.exports = function(hljs) { | ||
case_insensitive: true, | ||
defaultMode: { | ||
contains: [ | ||
{ | ||
className: 'pi', | ||
begin: '<\\?', end: '\\?>', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'doctype', | ||
begin: '<!DOCTYPE', end: '>', | ||
relevance: 10, | ||
contains: [{begin: '\\[', end: '\\]'}] | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '<!--', end: '-->', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'cdata', | ||
begin: '<\\!\\[CDATA\\[', end: '\\]\\]>', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'tag', | ||
/* | ||
The lookahead pattern (?=...) ensures that 'begin' only matches | ||
'<style' as a single word, followed by a whitespace or an | ||
ending braket. The '$' is needed for the lexem to be recognized | ||
by hljs.subMode() that tests lexems outside the stream. | ||
*/ | ||
begin: '<style(?=\\s|>|$)', end: '>', | ||
keywords: {title: 'style'}, | ||
contains: [TAG_INTERNALS], | ||
starts: { | ||
end: '</style>', returnEnd: true, | ||
subLanguage: 'css' | ||
} | ||
}, | ||
{ | ||
className: 'tag', | ||
// See the comment in the <style tag about the lookahead pattern | ||
begin: '<script(?=\\s|>|$)', end: '>', | ||
keywords: {title: 'script'}, | ||
contains: [TAG_INTERNALS], | ||
starts: { | ||
end: '</script>', returnEnd: true, | ||
subLanguage: 'javascript' | ||
} | ||
}, | ||
{ | ||
begin: '<%', end: '%>', | ||
subLanguage: 'vbscript' | ||
}, | ||
{ | ||
className: 'tag', | ||
begin: '</?', end: '/?>', | ||
contains: [ | ||
{ | ||
className: 'title', begin: '[^ />]+' | ||
}, | ||
TAG_INTERNALS | ||
] | ||
contains: [ | ||
{ | ||
className: 'pi', | ||
begin: '<\\?', end: '\\?>', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'doctype', | ||
begin: '<!DOCTYPE', end: '>', | ||
relevance: 10, | ||
contains: [{begin: '\\[', end: '\\]'}] | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '<!--', end: '-->', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'cdata', | ||
begin: '<\\!\\[CDATA\\[', end: '\\]\\]>', | ||
relevance: 10 | ||
}, | ||
{ | ||
className: 'tag', | ||
/* | ||
The lookahead pattern (?=...) ensures that 'begin' only matches | ||
'<style' as a single word, followed by a whitespace or an | ||
ending braket. The '$' is needed for the lexem to be recognized | ||
by hljs.subMode() that tests lexems outside the stream. | ||
*/ | ||
begin: '<style(?=\\s|>|$)', end: '>', | ||
keywords: {title: 'style'}, | ||
contains: [TAG_INTERNALS], | ||
starts: { | ||
end: '</style>', returnEnd: true, | ||
subLanguage: 'css' | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
className: 'tag', | ||
// See the comment in the <style tag about the lookahead pattern | ||
begin: '<script(?=\\s|>|$)', end: '>', | ||
keywords: {title: 'script'}, | ||
contains: [TAG_INTERNALS], | ||
starts: { | ||
end: '</script>', returnEnd: true, | ||
subLanguage: 'javascript' | ||
} | ||
}, | ||
{ | ||
begin: '<%', end: '%>', | ||
subLanguage: 'vbscript' | ||
}, | ||
{ | ||
className: 'tag', | ||
begin: '</?', end: '/?>', | ||
contains: [ | ||
{ | ||
className: 'title', begin: '[^ />]+' | ||
}, | ||
TAG_INTERNALS | ||
] | ||
} | ||
] | ||
}; | ||
}; |
169376
4440