-
Notifications
You must be signed in to change notification settings - Fork 0
/
never.min.js
1 lines (1 loc) · 1.56 KB
/
never.min.js
1
hljs.registerLanguage("never",function(){"use strict";return function(e){var n={keyword:"catch do enum else extern for func if in let match module range record throw use var while",type:"bool char double c_ptr float int long string void",literal:"false nil true c_null",built_in:"assert assertb assertf chr cos exp length log ord pow print printb printc printf prints read sin sqrt str strf tan"},a={className:"string",begin:'"',end:'"'},s={className:"type",begin:"\\b[A-Z][0-9A-Za-z$_]*"},r={className:"array",begin:"\\[",end:"\\]"};return{name:"never",aliases:["Never "],disableAutodetect:!0,case_insensitive:!1,keywords:n,contains:[s,{className:"function",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,keywords:n,contains:[r,s]},{className:"params",begin:/->/,end:/\{/,excludeBegin:!0,excludeEnd:!0,endsParent:!0,keywords:n,contains:[r,s]}]},{className:"function",beginKeywords:"enum record",end:"{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\{/,end:/\}/,endsParent:!0,keywords:n,contains:[r,s]}]},{className:"function",begin:"extern",end:"[\n\r]",excludeBeging:!0,keywords:n,contains:[a,{className:"title",begin:"\\bfunc",end:/[A-Za-z$_][0-9A-Za-z$_]*/,excludeBegin:!0},{className:"params",begin:/\{/,end:/\}/,endsParent:!0,contains:[r,s]}]},{className:"number",variants:[{begin:"\\b[\\d_]+(\\.[\\deE_]+)?\\b"},{begin:"\\b0[xX][a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?\\b"}]},a,e.C_BLOCK_COMMENT_MODE,e.HASH_COMMENT_MODE]}}}());