Skip to content

Commit

Permalink
beta v59
Browse files Browse the repository at this point in the history
  • Loading branch information
dschach committed Oct 26, 2023
1 parent 0b9c3f0 commit 7509d17
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 174 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"files": "**/*.js",
"options": { "parser": "json", "useTabs": false, "printWidth": 80 }
"options": { "parser": "babel", "useTabs": false, "printWidth": 80 }
},
{
"files": "doc*/**/*.html",
Expand Down
120 changes: 59 additions & 61 deletions dist/apex.es.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,95 +3,92 @@ var hljsGrammar=(()=>{"use strict";return e=>{
const t=e.regex,a="[a-zA-Z][a-zA-Z_0-9]*",n="@"+a,c={scope:"number",
match:t.either(/\b(\d{4}\-\d{2}\-\d{2}T\d{2}\:\d{2}\:\d{2}(\.\d{1,3})?(\-|\+)\d{2}\:\d{2})\b/,/\b(\d{4}\-\d{2}\-\d{2}T\d{2}\:\d{2}\:\d{2}(\.\d{1,3})?(Z)?)\b/,/\b(\d{4}\-\d{2}\-\d{2})\b/,/\b0(x|X)[0-9a-fA-F_]+(U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?\b/,/\b0(b|B)[01_]+(U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?\b/,/\b([0-9]+)?\.[0-9]+((e|E)[0-9]+)?(F|f|D|d|M|m)?\b/,/(-?)\b[0-9]+(e|E)[0-9]+(F|f|D|d|M|m)?\b/,/(-?)\b[0-9]+(F|f|D|d|M|m)\b/,/(-?)\b[0-9]+(U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?\b/,/(-?)(\b0[0-9]+|(\b\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?)/),
relevance:0
},s=["cast","default","export","try","catch","finally","get","set","put","if","for","else","do","while","continue","break","implements","extends","return","throw","when"],o={
match:t.concat(/(?<!\.)\b/,t.either("abstract","final","global","interface","override","private","protected","public","static","testMethod","transient","virtual","webservice"),/\b/),
scope:"keyword",relevance:0
},i=["false","true","null"],r=["anytype|0","blob|0","boolean|0","byte|0","currency|0","date|0","datetime|0","decimal|0","double|0","enum|0","float|0","integer|0","long|0","object|0","pagereference|10","selectoption|10","short|0","sobject|10","string|0","time|0","void|0","float|0"],l=["insert","update","upsert|8","delete","undelete","merge","convertLead|8"],b=[].concat("start","execute","finish","schedulable|10","batchable|10","queueable|10","comparable|10","callable|10").concat(...l),p=["ApexPages","AppLauncher","Approval","Auth","Cache","Canvas","ChatterAnswers","CommercePayments","ConnectApi","Database","Datacloud","Dataweave","DataSource","Dom","EventBus","ExternalService","Flow","Functions","Invocable","KbManagement","LxScheduler","Messaging","Metadata","Pref_center","Process","QuickAction","Reports","RichMessageing","Schema","Search","Sfc","Sfdc_Checkout","sfdc_surveys","Site","Support","System","TerritoryMgmt","TxnSecurity","UserProvisioning","VisualEditor","Wave"],u=["AccessLevel","Address","Answers","ApexPages","Approval","Assert","AsyncInfo","AsyncOptions","BusinessHours","Cases","Collator","Continuation","Cookie","Crypto","Database","Date","Datetime","Decimal","Domain","DomainCreator","DomainParser","EmailMessages","EncodingUtil","EventBus","Exception","FeatureManagement","FlexQueue","Formula","FormulaRecalcFieldError","FormulaRecalcResult","Http","HttpRequest","HttpResponse","Ideas","JSON","JSONGenerator","JSONParser","Label","Limits","Location","Matcher","Math","Messaging","MultiStaticResourceCalloutMock","Network","OrgLimit","OrgLimits","Packaging","PageReference","Pattern","QueueableDuplicateSignature","QueueableDuplicateSignature.Builder","QuickAction","Request","ResetPasswordResult","RestContext","RestRequest","RestResponse","Schema","Search","Security","SelectOption","Site","SObject","SObjectAccessDecision","StaticResourceCalloutMock","Test","TimeZone","Type","URL","UserInfo","UserManagement","Version","WebServiceCallout","XmlStreamReader","XmlStreamWriter"],d=["AccessType","DomainType","JSONToken","LoggingLevel","Quiddity","TriggerOperation"],m={
match:t.concat(/\b/,t.either(...i),/\b\s*(?=[,)])/),scope:"literal regex",
relevance:0},E=[{match:[/\bSystem/,/\./,t.either(...d),/\./,a],scope:{
},s=["cast","default","export","try","catch","finally","get","set","put","if","for","else","do","while","continue","break","implements","extends","return","throw","when"],o=["false","true","null"],i=["anytype|0","blob|0","boolean|0","byte|0","currency|0","date|0","datetime|0","decimal|0","double|0","enum|0","float|0","integer|0","long|0","object|0","pagereference|10","selectoption|10","short|0","sobject|10","string|0","time|0","void|0","float|0"],r=["insert","update","upsert|8","delete","undelete","merge","convertLead|8"],l=[].concat("start","execute","finish","schedulable|10","batchable|10","queueable|10","comparable|10","callable|10").concat(...r),b=["ApexPages","AppLauncher","Approval","Auth","Cache","Canvas","ChatterAnswers","CommercePayments","ConnectApi","Database","Datacloud","Dataweave","DataSource","Dom","EventBus","ExternalService","Flow","Functions","Invocable","KbManagement","LxScheduler","Messaging","Metadata","Pref_center","Process","QuickAction","Reports","RichMessageing","Schema","Search","Sfc","Sfdc_Checkout","sfdc_surveys","Site","Support","System","TerritoryMgmt","TxnSecurity","UserProvisioning","VisualEditor","Wave"],p=["AccessLevel","Address","Answers","ApexPages","Approval","Assert","AsyncInfo","AsyncOptions","BusinessHours","Cases","Collator","Continuation","Cookie","Crypto","Database","Date","Datetime","Decimal","Domain","DomainCreator","DomainParser","EmailMessages","EncodingUtil","EventBus","Exception","FeatureManagement","FlexQueue","Formula","FormulaRecalcFieldError","FormulaRecalcResult","Http","HttpRequest","HttpResponse","Ideas","JSON","JSONGenerator","JSONParser","Label","Limits","Location","Matcher","Math","Messaging","MultiStaticResourceCalloutMock","Network","OrgLimit","OrgLimits","Packaging","PageReference","Pattern","QueueableDuplicateSignature","QueueableDuplicateSignature.Builder","QuickAction","Request","ResetPasswordResult","RestContext","RestRequest","RestResponse","Schema","Search","Security","SelectOption","Site","SObject","SObjectAccessDecision","StaticResourceCalloutMock","Test","TimeZone","Type","URL","UserInfo","UserManagement","Version","WebServiceCallout","XmlStreamReader","XmlStreamWriter"],u=["AccessType","DomainType","JSONToken","LoggingLevel","Quiddity","TriggerOperation"],d={
match:t.concat(/\b/,t.either(...o),/\b\s*(?=[,)])/),scope:"literal regex",
relevance:0},m=[{match:[/\bSystem/,/\./,t.either(...u),/\./,a],scope:{
1:"built_in",3:"built_in",5:"variable.constant"},relevance:9},{
match:[t.concat(/\b/,t.either(...d)),/\./,a,/\b(?![\.\(])/],scope:{1:"built_in",
match:[t.concat(/\b/,t.either(...u)),/\./,a,/\b(?![\.\(])/],scope:{1:"built_in",
3:"variable.constant"},relevance:0},{
match:[t.either(...p),/\./,t.concat("(?=",a,"\\.)")],scope:{1:"built_in"}},{
match:[t.concat(/\b/,t.either(...p)),/\./,t.concat("(?=",a,"\\s*\\()")],scope:{
match:[t.either(...b),/\./,t.concat("(?=",a,"\\.)")],scope:{1:"built_in"}},{
match:[t.concat(/\b/,t.either(...b)),/\./,t.concat("(?=",a,"\\s*\\()")],scope:{
1:"built_in",3:"title.function.invoked"},relevance:10},{
match:[/\b/,t.either(...p),/\b(?!\.)/],scope:{2:"built_in"}},{
match:[t.concat(/\b/,"(?<=",t.either(...u),")."),a,/(?=\()/],scope:{
match:[/\b/,t.either(...b),/\b(?!\.)/],scope:{2:"built_in"}},{
match:[t.concat(/\b/,"(?<=",t.either(...p),")."),a,/(?=\()/],scope:{
2:"title.class",4:"title.function.invoke"},relevance:4},{
match:[/\b/,t.either(...u),/(?=\.)/],scope:{2:"title.class"},relevance:4}],A={
match:[/\bswitch\s+on\s+/,a],scope:{1:"keyword",2:"variable"}},h={
match:[/\b/,t.either(...p),/(?=\.)/],scope:{2:"title.class"},relevance:4}],E={
match:[/\bswitch\s+on\s+/,a],scope:{1:"keyword",2:"variable"}},A={
match:t.concat(t.either(/(?<!=|!)\=(?!=|>)/,/--/,/\+\+/,/&&|\|\|/,/\*=|\/=|%=|\+=|-=/,/\&=|\^=|<<=|>>=|>>>=|\|=/,/\&|~|\^|\|/,/%[^%]|\*[^\/]|\/[^\/\*]|(?<!\-)\-(?!\-)|(?<!\+)\+(?!\+)/,/<<|>>/,/<=|>=|\s(<|>)\s/,/==|!=/,/=>/,/!(?=\w)/,/\&\&/,/(?<=\s)(\?|:)(?=\s)/,/\?\./,/(?<!\?)\?(?!\?|\.|\[)/),"{1}"),
scope:"operator",relevance:0},S={match:t.either(/(\{|\})/,",",/\(|\)/,";"),
scope:"punctuation",relevance:0},g=e.COMMENT("//",/[$\n]/,{relevance:0
}),T=e.COMMENT("/\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{
scope:"operator",relevance:0},h={match:t.either(/(\{|\})/,",",/\(|\)/,";"),
scope:"punctuation",relevance:0},S=e.COMMENT("//",/[$\n]/,{relevance:0
}),g=e.COMMENT("/\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{
match:[/@(?:exception|throws)/,/\s+/,a],scope:{1:"doctag",3:"class.title"}},{
begin:/@[A-Za-z_]+\s/,scope:"doctag"},{begin:"`",end:"`",excludeBegin:!0,
excludeEnd:!0,scope:"code",contains:[e.BACKSLASH_ESCAPE],relevance:0
},e.inherit(e.APOS_STRING_MODE,{scope:"meta string"}),{
match:[/(?<=@param)/,/\s+/,/\S+/],scope:{3:"variable"}}]}),v=[{
match:[/(?<=@param)/,/\s+/,/\S+/],scope:{3:"variable"}}]}),T=[{
match:t.concat(n,/\b(?!\s*\()/),scope:"meta"},{begin:[t.concat(n,/\b/),/\s*\(/],
beginScope:{1:"meta"},end:/\)/,returnEnd:!0,scope:"annotation",contains:[{
match:[t.concat(/\b/,a),/(?=\s*=)/],scope:{1:"meta keyword"},contains:[h]
},e.inherit(e.APOS_STRING_MODE,{scope:"meta string"}),c],keywords:{literal:i}
match:[t.concat(/\b/,a),/(?=\s*=)/],scope:{1:"meta keyword"},contains:[A]
},e.inherit(e.APOS_STRING_MODE,{scope:"meta string"}),c],keywords:{literal:o}
}],R=[{match:[/\b[a-zA-Z0-9\.]*Exception\b/,/\s+/,a],scope:{1:"title.class",
3:"variable"},relevance:0}],_=[{scope:"collection",
3:"variable"},relevance:0}],v=[{scope:"collection",
begin:/\b(list|set|map)\s*(?=<)/,beginScope:"type",end:/>+/,
endScope:"punctuation",contains:[{match:/</,scope:"punctuation"},S,{
endScope:"punctuation",contains:[{match:/</,scope:"punctuation"},h,{
match:t.concat(/\b/,a,/\b/),scope:"type"}],relevance:10},{match:[a,/\s*\[\]/],
scope:{1:"type",2:"punctuation"},contains:[S],relevance:0}],O={
scope:"assignment",relevance:0,contains:[S,h],variants:[{
scope:{1:"type",2:"punctuation"},contains:[h],relevance:0}],_={
scope:"assignment",relevance:0,contains:[h,A],variants:[{
match:[a,/\s+/,a,/(?=\s*\=)/],scope:{1:"type",3:"variable assigned"}},{
match:[a,/\s+/,a,/\s*/,";"],scope:{1:"type",3:"variable declare"}},{
match:[/(?<!\.)\b/,a,/(?=\s*\=)/],scope:{2:"variable mynum"}},{
match:[/(?<==)\s*/,/\(/,a,/\)/],scope:{2:"punctuation",3:"type",4:"punctuation"}
}]};t.concat(/\b/,a,/__(c|pc|r|b|e|mdt|x|share|kav|ka|history|del|s)/,/\b/)
;const N={scope:"params",begin:/\(/,beginScope:"punctuation",end:/\)/,
;const O={scope:"params",begin:/\(/,beginScope:"punctuation",end:/\)/,
endScope:"punctuation",endsParent:!0,relevance:0,
contains:[c,e.APOS_STRING_MODE,g,T,h,O,_,m,E,c,"self",{
contains:[c,e.APOS_STRING_MODE,S,g,A,_,v,d,m,c,"self",{
match:[t.concat(/(?<=[,\(])\s*/,a),/\./,a,/\s*(?=[,)])/],scope:{1:"variable",
3:"variable"}},{match:[t.concat(/\b/,a),/\s+/,a,/\s*(?=[,)])/],scope:{1:"type",
3:"variable"}},{match:[a,/\s*(?=[,)])/],scope:{1:"variable"}}]},D=[{
3:"variable"}},{match:[a,/\s*(?=[,)])/],scope:{1:"variable"}}]},N=[{
begin:[/\bnew\b/,/\s+/,a,/\s*(?=\()/],beginScope:{1:"keyword",
3:"title.function.invoke"},end:/\)/,returnEnd:!0,scope:"instantiate",
contains:[N,g,S],illegal:":",relevance:0}],y={end:/(?=\)\s*[^{])/,returnEnd:!0,
contains:[O,S,h],illegal:":",relevance:0}],D={end:/(?=\)\s*[^{])/,returnEnd:!0,
scope:"method_call",relevance:0,variants:[{begin:t.concat(a,/(?=\s*\()/),
beginScope:"title.function.invoke"},{
begin:[t.either(...p),/\./,t.concat(a,/(?=\s*\()/)],beginScope:{1:"built_in",
begin:[t.either(...b),/\./,t.concat(a,/(?=\s*\()/)],beginScope:{1:"built_in",
3:"title.function.invoke"}},{begin:[a,/\./,t.concat(a,/(?=\s*\()/)],beginScope:{
1:"class.title",3:"title.function.invoke"}}],
contains:[g,T,e.APOS_STRING_MODE,N,D,"self"],relevance:0,illegal:[].concat(...s)
contains:[S,g,e.APOS_STRING_MODE,O,N,"self"],relevance:0,illegal:[].concat(...s)
},I={begin:[/\btrigger/,/\s+/,a,/\s+/,"on",/\s+/,a],beginScope:{1:"keyword",
3:"title.class",5:"operator",7:"type"},end:"{",returnEnd:!0,
scope:"trigger_declaration",contains:[g,T,{begin:/\(/,beginScope:"punctuation",
scope:"trigger_declaration",contains:[S,g,{begin:/\(/,beginScope:"punctuation",
end:/\)/,endScope:"punctuation",scope:"trigger_params",contains:[{
match:/\b(before|after)\s+(insert|update|delete|merge|undelete)\b/,
scope:"built_in"}]}]},L={begin:/\bclass\b/,beginScope:"keyword",end:/\{/,
endScope:"punctuation",scope:"class_declaration",keywords:{type:r,keyword:s},
contains:[E,{match:[/(?<=\bclass\b)\s+/,a],scope:{2:"title.class"}},{
scope:"built_in"}]}]},y={begin:/\bclass\b/,beginScope:"keyword",end:/\{/,
endScope:"punctuation",scope:"class_declaration",keywords:{type:i,keyword:s},
contains:[m,{match:[/(?<=\bclass\b)\s+/,a],scope:{2:"title.class"}},{
returnEnd:!0,endsWithParent:!0,variants:[{beginKeywords:"implements",
end:/(\b(extends)\b)|\{/,scope:"implements block"},{beginKeywords:"extends",
end:/(\b(implements)\b)|\{/,scope:"extends block"}],contains:[E,{match:/\<|\>/,
scope:"punctuation"},{match:t.concat(/\b/,t.either(...p),/\b\s*(?!<>)/),
end:/(\b(implements)\b)|\{/,scope:"extends block"}],contains:[m,{match:/\<|\>/,
scope:"punctuation"},{match:t.concat(/\b/,t.either(...b),/\b\s*(?!<>)/),
scope:"built_in"},{match:[/\b/,a,/\./,a,/(?=[,\s<])/],scope:{2:"built_in",
4:"title.class.inherited"}},{match:[/\b/,a,/(?=>)/],scope:{2:"type"}},{
match:t.concat(/\b/,a,/\b(?!<)/),scope:"title.class.inherited"},{
match:t.concat(/\b/,t.either(...b),/\b\s*(?!>)/),scope:"title.class.inherited"}]
}]},C={begin:[/\benum\s+/,a,/\s*/,/\{/],beginScope:{1:"type",2:"type"},
end:/[\}\n]/,returnEnd:!0,scope:"enum_declaration",relevance:0,contains:[g,T,S,{
match:t.concat(/\b/,a,/\b/),scope:"variable.constant"}]},M=[].concat(I,{
match:t.concat(/\b/,t.either(...l),/\b\s*(?!>)/),scope:"title.class.inherited"}]
}]},L={begin:[/\benum\s+/,a,/\s*/,/\{/],beginScope:{1:"type",2:"type"},
end:/[\}\n]/,returnEnd:!0,scope:"enum_declaration",relevance:0,contains:[S,g,h,{
match:t.concat(/\b/,a,/\b/),scope:"variable.constant"}]},C=[].concat(I,{
relevance:10,match:/\b(with|without|inherited)\s+sharing\b/,scope:"keyword"},{
match:[/\bTrigger/,/\./,/(isExecuting|isInsert|isUpdate|isDelete|isBefore|isAfter|isUndelete|new|newMap|old|oldMap|size|operationType)\b/],
scope:{1:"built_in",3:"keyword"},relevance:10},C,[{
scope:{1:"built_in",3:"keyword"},relevance:10},L,[{
begin:[/(public|private|protected)\s+/,a,/(?=\s*\()/],beginScope:{1:"keyword",
2:"constructor"},end:/\{/,contains:[N,S]}],L),U=[{
match:[/\breturn\b\s+/,t.either(i)],scope:{2:"literal"}},{
2:"constructor"},end:/\{/,contains:[O,h]}],y),M=[{
match:[/\breturn\b\s+/,t.either(o)],scope:{2:"literal"}},{
match:[/\breturn\s+(?!(true|false|null))/,a,";"],scope:{2:"variable"}},{
match:[/\breturn\b/,/\s+/,t.lookahead(a+/\(/)],scope:{2:"title.function.invoke"}
}],f={begin:[/\[/,/\s*/,/\b(SELECT|FIND)\b/],beginScope:{1:"punctuation",
}],U={begin:[/\[/,/\s*/,/\b(SELECT|FIND)\b/],beginScope:{1:"punctuation",
3:"keyword soql"},end:/\]/,endScope:"punctuation outer",scope:"soql",
relevance:10,contains:[{begin:[/\bFROM\b/,t.concat(/\s+/,a,/\b/)],beginScope:{
1:"keyword",2:"type"},scope:"from_clause",end:/(?=\]|\s)/,contains:[{
match:[/(?<=\.)/,a,/\b/],scope:{2:"type"}},S]},{match:/\]/,scope:"punctuation",
match:[/(?<=\.)/,a,/\b/],scope:{2:"type"}},h]},{match:/\]/,scope:"punctuation",
endsParent:!0},{match:/\b\s*IN|=\s*:/,scope:"operator"},{
begin:t.concat(/\b/,t.either("ABOVE_OR_BELOW","ACTIVE","ADVANCED","ALL","ANY","ARRAY","AS","BY","CATEGORY","CONTAINS","CUSTOM","DATA","DIVISION","END","FIELDS","FIND","FROM","LAST","METADATA","NETWORK","ON","RETURNING","ROLLUP","ROWS","SEARCH","SELECT","SNIPPET","SORT","STANDARD","USER_MODE","WHERE",/USING\s+SCOPE\s*(Delegated|Everything|Mine|My_Territory|My_Team_Territory|Team)/,/WITH\s+SECURITY_ENFORCED/),/\b/),
scope:"keyword soql",relevance:0},{
Expand All @@ -105,23 +102,24 @@ match:/(NEXT|LAST|THIS)_(90_DAY|DAY|FISCAL_QUARTER|FISCAL_YEAR|MONTH|QUARTER|WEE
scope:"variable.language",relevance:10},{
match:[/(NEXT|LAST)_N_(DAY|FISCAL_QUARTER|FISCAL_YEAR|MONTH|QUARTER|WEEK|YEAR)S/,/\s*:\s*/,/\d+/],
scope:{1:"variable.language",2:"operator",3:"number"},relevance:10},{
match:[/(?<=:)/,/\s*/,a],scope:{3:"variable"}},c,y,h,S,e.APOS_STRING_MODE],
illegal:"::"},w={begin:[/\bfor\b\s*/,/\(/,a,/\s+/,a,/\s*:/],beginScope:{
match:[/(?<=:)/,/\s*/,a],scope:{3:"variable"}},c,D,A,h,e.APOS_STRING_MODE],
illegal:"::"},f={begin:[/\bfor\b\s*/,/\(/,a,/\s+/,a,/\s*:/],beginScope:{
3:"type",5:"variable for",6:"operator"},scope:"for_loop",end:[/\)\s*\{/],
endScope:{1:"punctuation"},contains:[g,T,f,y,{match:t.concat(a,/\b(?!\()/),
scope:"variable"}],METHOD_CALL:y,PUNCTUATION_RE:S,OPERATOR_RE:h};return{
name:"Apex",aliases:["apex","lightning","soql"],case_insensitive:!0,
disableAutodetect:!1,ignoreIllegals:!1,keywords:{$pattern:a,keyword:s,
"variable.language":["instanceof","new","super","this"],built_in:b,type:r,
literal:i},
illegal:["</","<#","<]","<div>","\x3c!--","!DOCTYPE",/<iframe\b/,/^#/,/^import \.[a-zA-Z]+\./,/^import [\w]+/,/^import$/,/^include </,/^use\s+</,/\b(const|var)\s+\w+\s*=/,/\bstruct\b/,"System.log","console.log",/\bfor\s+\w+\s+IN\s+/,/\bif\s+\w+\s+IN\s+/,/\bend\s+if\b/,/\bend\s+select\b/,/\b(int|var)\s+\w+\s+=/,/\b(int[0-9]+|bool)\b/,/\b\$/,"::=",/\s#[a-zA-Z]/,/\s_[a-zA-Z]/,/\s\$[a-zA-Z]/,"#if","%if",/\bif(?!\s+\()/,"%endif","#endif",/\w::\w/,/(SELECT|RETURNING)\s+\*/,/END\s+LOOP/,/CREATE\s+FUNCTION/,/\bint\b/,/import\s+\w+\s+=\s+require\("\w+"\)/,"/^include\b/",/\buse\s+strict\b/,/\w+\s+=\s+"\S*";/,/\/include\//,/\Anamespace\b/,/\bend(\.)?\n/,'"""',/\+\+\+/,/<%/,"<%#","%%>","<%%",":-",/\bmergesort\(/,/\bvar\s+env\b/,/\bdef\b\s\W:/,/"[^"]+"/],
contains:[v,O,_,T,g,M,[{begin:t.concat(/\s\b/,t.either(...l),/\b\s/),
beginScope:"built_in",end:/;|$/,scope:"dml",contains:[D,{
match:/\bas\s+(user|system)\b/,scope:"keyword"},{match:[a,/\s*;/],scope:{
1:"variable"}},S,g,f]},{begin:[/\bDatabase\b/,/\./,a,/\s*/,t.lookahead(/\(/)],
beginScope:{1:"built_in",3:"built_in"},end:";",scope:"database_dml",
contains:[N,m,e.APOS_STRING_MODE,T,g,{match:[/\(/,a,/,/],scope:{2:"variable"}},{
endScope:{1:"punctuation"},contains:[S,g,U,D,{match:t.concat(a,/\b(?!\()/),
scope:"variable"}],METHOD_CALL:D,PUNCTUATION_RE:h,OPERATOR_RE:A},w=[{
begin:t.concat(/\s\b/,t.either(...r),/\b\s/),beginScope:"built_in",end:/;|$/,
scope:"dml",contains:[N,{match:/\bas\s+(user|system)\b/,scope:"keyword"},{
match:[a,/\s*;/],scope:{1:"variable"}},h,S,U]},{
begin:[/\bDatabase\b/,/\./,a,/\s*/,t.lookahead(/\(/)],beginScope:{1:"built_in",
3:"built_in"},end:";",scope:"database_dml",
contains:[O,d,e.APOS_STRING_MODE,g,S,{match:[/\(/,a,/,/],scope:{2:"variable"}},{
match:["AccessLevel",/\./,/(SYSTEM_MODE|USER_MODE)/],scope:{1:"built_in",
3:"keyword"}}]}],R,w,e.APOS_STRING_MODE,D,y,E,c,h,S,U,{
match:/(?<!\.)\bId\b(?=[\s>])/,scope:"type",relevance:8},f,o,A]}}})()
3:"keyword"}}]}];return{name:"Apex",aliases:["apex","lightning","soql"],
case_insensitive:!0,disableAutodetect:!1,ignoreIllegals:!1,keywords:{$pattern:a,
keyword:s.concat("abstract","final","global","interface","override","private","protected","public","static","testMethod","transient","virtual","webservice"),
"variable.language":["instanceof","new","super","this"],built_in:l,type:i,
literal:o},
illegal:["</","<#","<]","<div>","\x3c!--","!DOCTYPE",/<iframe\b/,/^#/,/^import \.[a-zA-Z]+\./,/^import [\w]+/,/^import$/,/^include </,/^use\s+</,/\b(const|var)\s+\w+\s*=/,/\bstruct\b/,"System.log","console.log",/\bfor\s+\w+\s+IN\s+/,/\bif\s+\w+\s+IN\s+/,/\bend\s+if\b/,/\bend\s+select\b/,/\b(int|var)\s+\w+\s+=/,/\b(int[0-9]+|bool)\b/,/\b\$/,"::=",/\s#[a-zA-Z]/,/\s_[a-zA-Z]/,/\s\$[a-zA-Z]/,"#if","%if",/\bif(?!\s+\()/,"%endif","#endif",/\w::\w/,/(SELECT|RETURNING)\s+\*/,/END\s+LOOP/,/CREATE\s+FUNCTION/,/\bint\b/,/import\s+\w+\s+=\s+require\("\w+"\)/,"/^include\b/",/\buse\s+strict\b/,/\w+\s+=\s+"\S*";/,/\/include\//,/\Anamespace\b/,/\bend(\.)?\n/,'"""',/\+\+\+/,/<%/,"<%#","%%>","<%%",":-",/\bmergesort\(/,/\bvar\s+env\b/,/\bdef\b\s\W:/,/"[^"]+"/],
contains:[T,_,v,g,S,C,w,R,f,e.APOS_STRING_MODE,N,D,m,c,A,h,M,{
match:/(?<!\.)\bId\b(?=[\s>])/,scope:"type",relevance:8},U,E]}}})()
;export default hljsGrammar;
Loading

0 comments on commit 7509d17

Please sign in to comment.