function T(e){const p=["fork","join","while","returns","transaction","transactional","retry","commit","rollback","typeof","enum","wait","match"],u=["if","else"],_=["for","foreach"],g=["return","break","continue","check","checkpanic","panic","trap","from","where"],O=["public","private","external","return","record","object","remote","abstract","client","true","false","fail","import","version","as","on","function","resource","listener","const","final","is","null","lock","annotation","source","worker","parameter","field","isolated","in","xmlns","table","key","let","new","select","start","flush","default","do","base16","base64","conflict","limit","outer","equals","order","by","ascending","descending","class","configurable","variable","module","service","group","collect"],o=["handle","any","future","typedesc","boolean","int","string","float","decimal","byte","json","xml","anydata","map","error","never","readonly","distinct","stream","type","var"],w=["self"],m=["true","false"],r=[...p,...u,..._,...g,...O],a={keyword:r,literals:m,type:o,built_in:w},n=new RegExp("(?:"+r.join("|")+")"),R=new RegExp("(?:"+o.join("|")+")"),M=new RegExp("(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+((?<!\\.)\\.(?!\\.)\\d*)?|(?<!\\.)\\.(?!\\.)\\d+)([eE][-+]?\\d+)?)"),s={scope:"string",begin:/`/,end:/`/,contains:[e.BACKSLASH_ESCAPE,{scope:"variable",begin:/\$\{/,end:/\}/,excludeBegin:!0,excludeEnd:!0}]},i={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,{match:n,relevance:0}],relevance:0},l={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,{match:n,relevance:0}]},t={scope:"string",variants:[i,l,s]},E={scope:"number",begin:M,relevance:0},c={scope:"number",variants:[E,e.BINARY_NUMBER_MODE]},b={scope:"operator",match:/(!|%|\+|\-|\*|~=|===|==|=|!=|!==|<|>|&|\||\?:|\.\.\.|<=|>=|&&|\|\||~|>>|>>>)/,relevance:0},d={variants:[{begin:[R.source,/(?:\[[\w\*]*\])*\s+/,/(?:\w|\\.\w)+\b(?!\))/,/\s*/,/=?/,/;?/],beginScope:{1:"keyword",3:"variable",5:"operator"}},{scope:"variable",match:/'/,contains:[{match:n}]}],relevance:0},f={variants:[{begin:[/type/,/\s+/,/\w+/,/\s+/,/(?:\w|\&)+/,/\{/],end:/\}/,beginScope:{1:"keyword",3:"title.class",5:"keyword"},contains:[{match:/\&/,relevance:0}]},{begin:[/=/,/\s*\{/],beginScope:{1:"operator"},end:"\\}",contains:[{match:/:/,scope:"keyword"},e.C_LINE_COMMENT_MODE,t,c]}],keywords:a,contains:["self",e.C_LINE_COMMENT_MODE,d,c,t]},v={begin:/xml\s*`/,end:/`/,excludeBegin:!0,excludeEnd:!0,subLanguage:"xml",relevance:2},S={scope:"params",keywords:a,variants:[{match:/'/,contains:[{match:n}]},E,e.BINARY_NUMBER_MODE,i,l,s,b,{begin:/\w+/}],relevance:0},y={variants:[{begin:[/@/,/\w+/,/:/,/\w+/,/\s*\{/],contains:[t,{match:":",scope:"keyword"}],end:/\}/},{begin:[/@/,/test/,/:/,/\w+/]}],beginScope:{2:"title.class",3:"keyword",4:"title.function"},relevance:0};return{name:"Ballerina",aliases:["bal"],keywords:a,contains:[{match:[/class/,/\s+/,/\w+/,/\s*{/],scope:{1:"keyword",3:"title.class"},relevance:0},{begin:[/function/,/\s+/,/\w+/,/\s*/,/\(/],beginScope:{1:"keyword",3:"title.function"},end:/\)/,variants:[{begin:[/function/,/\s+/,/\(/],beginScope:{1:"keyword"},end:/\)/},{begin:[/:?/,/\b(?!while\b)\w+\b/,/\s*/,/\(/],beginScope:{1:"keyword",2:"title.function"},end:/\)/}],contains:["self",S],relevance:0},f,d,e.C_LINE_COMMENT_MODE,c,t,y,{scope:"meta.arrow.ballerina storage.type.function.arrow.ballerina",match:/(=>)/},b,v,{begin:/import (?:ballerina|ballerinax)\/[a-z]+/,keywords:"import",relevance:4}]}}export{T as default};
