UNPKG

698 BJavaScriptView Raw
1hljs.registerLanguage("thrift",(()=>{"use strict";return e=>{
2const t=["bool","byte","i16","i32","i64","double","string","binary"];return{
3name:"Thrift",keywords:{
4keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],
5type:t,literal:"true false"},
6contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{
7className:"class",beginKeywords:"struct enum service exception",end:/\{/,
8illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,
9excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{
10type:[...t,"set","list","map"]},end:">",contains:["self"]}]}}})());
\No newline at end of file