Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rearrange modules to better order for parsing #30

Merged
merged 6 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 76 additions & 69 deletions dist/apex.es.min.js
Original file line number Diff line number Diff line change
@@ -1,105 +1,112 @@
/*! `apex` grammar compiled for Highlight.js 11.9.0 */
var hljsGrammar=(()=>{"use strict";return e=>{
const t=e.regex,a="[a-zA-Z][a-zA-Z_0-9]*",n="\\b"+a+"\\b",c="@"+a,o=/(?=\s*\()/,s=/\s+/,r=/\?\.\b/,i=[{
const t=e.regex,a="[a-zA-Z][a-zA-Z_0-9]*",c="\\b"+a+"\\b",n="@"+a,s=/(?=\s*\()/,o=/\s+/,r=/\?\./,i=[{
match:/(?<!\?)\./,scope:"punctuation",relevance:0},{match:r,scope:"operator",
relevance:0}];function l(...e){return t.concat("(?!",e.join("|"),")")}const p={
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
},b=["try","catch","finally","get","set","put","if","for","else","do","while","continue","break","implements","extends","return","throw","when","new"],u=["instanceof","super","this"],d=["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|8","selectoption|8","short|0","sobject|10","string|0","time|0","void|0","float|0"],m=["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"],E=["false","true","null"],A={
},b=["try","catch","finally","get","set","put","if","for","else","do","while","continue","break","implements","extends","return","throw","when","new"],u=["instanceof","super","this"],d=["abstract","final","global","interface","override","private","protected","public","static","testMethod","transient","virtual","webservice"],m=["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|8","selectoption|8","short|0","sobject|10","string|0","time|0","void|0","float|0"],E=["insert","update","upsert","delete","undelete","merge","convertLead"],A=["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"],h=["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","Search","Security","SelectOption","Site","SObject","SObjectAccessDecision","StaticResourceCalloutMock","Test","TimeZone","Type","URL","UserInfo","UserManagement","Version","WebServiceCallout","XmlStreamReader","XmlStreamWriter"],v=["AccessType","AccessLevel","DomainType","JSONToken","LoggingLevel","Quiddity","TriggerOperation","operationType"],S=["false","true","null"],T={
match:/,/,scope:"punctuation",relevance:0
},h=[/--/,/\+\+/,/\&\&|\|\|/,/\*\=|\/\=|\%\=|\+\=|-\=/,/\&\=|\^\=|<<\=|>>\=|>>>\=|\|\=/,/\&|~|\^|\|/,/<<|>>/,/<\=|>\=|\s(<|>)\s/,/\=\=|!\=/,/\=>/,/!(?=\w)/,/(?<=\s)(\?|:)(?=\s)/,r,/(?<!\?)\?(?!\?|\.|\[)/,/%[^%]|\*[^\/]|\/[^\/\*]|(?<!\-)\-(?!\-)|(?<!\+)\+(?!\+)/,/(?<!\=|!)\=(?!\=|>)/],S=m.concat("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","Search","Security","SelectOption","Site","SObject","SObjectAccessDecision","StaticResourceCalloutMock","Test","TimeZone","Type","URL","UserInfo","UserManagement","Version","WebServiceCallout","XmlStreamReader","XmlStreamWriter"),v={
$pattern:t.concat(/(?<!\.)\b/,a,/\b/),
keyword:[...b,"abstract","final","global","interface","override","private","protected","public","static","testMethod","transient","virtual","webservice","insert","update","upsert","delete","undelete","merge","convertLead"],
"variable.language":u,built_in:S,type:d,literal:E},T={
},R=[/--/,/\+\+/,/\&\&|\|\|/,/\*\=|\/\=|\%\=|\+\=|-\=/,/\&\=|\^\=|<<\=|>>\=|>>>\=|\|\=/,/\&|~|\^|\|/,/<<|>>/,/<\=|>\=|\s(<|>)\s/,/\=\=|!\=/,/\=>/,/!(?=\w)/,/(?<=\s)(\?|:)(?=\s)/,r,/(?<!\?)\?(?!\?|\.|\[)/,/%[^%]|\*[^\/]|\/[^\/\*]|(?<!\-)\-(?!\-)|(?<!\+)\+(?!\+)/,/(?<!\=|!)\=(?!\=|>)/],g=A.concat(...h),y={
$pattern:t.concat(/(?<!\.)\b/,a,/(?!\s*\()/),keyword:[...b,...d,...E],
"variable.language":u,type:m,literal:S
},O=[...S,...b,...d,...A,...h,...v,...u,...E],L={
match:t.concat(/\b/,t.either(...u),/\b/),scope:"variable.language",relevance:0
},R=[{match:[/\b/,t.either(...m),/\./,a,/(?=\.)/],scope:{2:"built_in",4:"type"}
},{match:[/\b/,t.either(...m),/\./,a,/\b(?!\.|\()/],scope:{2:"built_in",
3:"punctuation",4:"keyword"}},{match:[/\b/,t.either(...m),/\./,a,o],scope:{
2:"built_in",3:"punctuation",4:"keyword"}},{
match:[t.concat(/\b/,t.either("AccessType","AccessLevel","DomainType","JSONToken","LoggingLevel","Quiddity","TriggerOperation","operationType")),/\??\./,a,/\s*(?![\.\(])/],
scope:{1:"built_in",2:"punctuation",3:"variable"},relevance:0},{
},N=[{match:[t.concat(/\b/,t.either(...v)),/\./,a,/\b\s*(?![\.\(])/],scope:{
1:"built_in",2:"punctuation",3:"variable"},relevance:0},{
match:[t.concat(/\b/,t.either(...h)),/\./,a,/\b\s*(?![\.\(])/],scope:{
1:"built_in",2:"punctuation",3:"type"},relevance:0},{
match:[t.concat(/\b/,t.either(...A)),/\./,t.concat(c,/\b(?=\.)/)],scope:{
1:"built_in",2:"punctuation",3:"type"}},{
match:[t.concat(/\b/,t.either(...A,...h)),/\./,c,/\b(?!\.)/],scope:{
1:"built_in",2:"punctuation",3:"keyword"}},{
match:[/\bTrigger\b/,/\./,/(isExecuting|isInsert|isUpdate|isDelete|isBefore|isAfter|isUndelete|new|newMap|old|oldMap|size|operationType)\b(?!\.)/],
scope:{1:"built_in",2:"punctuation",3:"type"},relevance:10},{
match:[/\btrigger\b/,/\./,"operationtype",/\./,t.concat(n,/\b/)],scope:{
match:[/\btrigger\b/,/\./,"operationtype",/\./,t.concat(c,/\b/)],scope:{
1:"built_in",2:"punctuation",3:"keyword",4:"punctuation",5:"variable.constant"},
relevance:10}],g=[{
relevance:10}],C=[{
match:t.either(",",/;/,/(?<=\w)\>/,/\<(?=\w)/,/\{|\}/,/\(|\)/,/\{|\}/),
scope:"punctuation",relevance:0},A],y=e.inherit(e.APOS_STRING_MODE,{
scope:"punctuation",relevance:0},T],D=e.inherit(e.APOS_STRING_MODE,{
scope:"string",relevance:0,contains:[{match:/\\'/,scope:"literal",relevance:0}]
}),O=e.COMMENT("//",/[$\n]/,{relevance:0}),L=[e.COMMENT("/\\*","\\*/",{
}),w=e.COMMENT("//",/[$\n]/,{relevance:0}),I=[e.COMMENT("/\\*","\\*/",{
relevance:0,contains:[{begin:/\w+@/,relevance:0},{
match:[/@(?:exception|throws)/,s,a],scope:{1:"doctag",3:"title.class"},
match:[/@(?:exception|throws)/,o,a],scope:{1:"doctag",3:"title.class"},
relevance:0},{begin:"@[A-Za-z_-]+",scope:"doctag",relevance:0},{
match:[/(?<=@param)\s+/,a],scope:{2:"variable"},relevance:0},{begin:"`",end:"`",
scope:"string",contains:[e.BACKSLASH_ESCAPE],relevance:0}]}),O],N={
match:t.either(...h),scope:"operator",relevance:0},w={match:/(?<!\.)\bId\b/,
scope:"type",relevance:8},C=[{begin:/\b(list|set|map)(?=\s*<)/,
scope:"string",contains:[e.BACKSLASH_ESCAPE],relevance:0}]}),w],_={
match:t.either(...R),scope:"operator",relevance:0},U={match:/(?<!\.)\bId\b/,
scope:"type",relevance:8},M=[{begin:/\b(list|set|map)(?=\s*<)/,
beginScope:"type",end:/\>+/,endScope:"punctuation",contains:[{match:/\<|\,/,
scope:"punctuation"},{match:n,scope:"type"}],relevance:8},{
match:[t.optional(n),/\[/,t.optional(/\d+/),/\]/],scope:{1:"variable",
scope:"punctuation"},{match:c,scope:"type"}],relevance:8},{
match:[t.optional(c),/\[/,t.optional(/\d+/),/\]/],scope:{1:"variable",
2:"punctuation",3:"number",4:"punctuation"}},{match:[a,/\[\]/],scope:{1:"type",
2:"punctuation"},relevance:0}],D=[{match:t.concat(c,/\b(?!\s*\()/),scope:"meta"
},{scope:"meta",begin:[t.concat(c,/\b/),/\s*/,/\(/],beginScope:{3:"punctuation"
},end:/\)/,endScope:"punctuation",contains:[{match:[n,/\s*=/],scope:{
1:"keyword",2:"operator"},contains:[N]},y,p],keywords:{literal:E}}],I={
match:[/\b[a-zA-Z0-9\.]*Exception/,s,a],scope:{1:"title.class",3:"variable"},
relevance:0},_={match:[/(?<!\.)/,n,/\s*(?=\=[^\>])/],scope:{2:"variable"},
relevance:0},U={match:[/(?<=\=\s*\()/,a,"(?=\\)\\s*"+a+")"],scope:{2:"type"},
relevance:0},M={match:[/\bnew\s+/,a,o],scope:{2:"type"},relevance:0},f={
begin:/\((?!(\s*\[))/,beginScope:"punctuation",end:/\)/,endScope:"punctuation",
relevance:0,keywords:v,contains:[y,M,L,N,C,R,p,w,{keywords:{KEYWORDS:v},
match:t.concat(/(?<=\s|\(|\,)/,l(...E),a,/\b/,/(?!\.)/),scope:"variable",
relevance:0},{match:/\,|\./,scope:"punctuation",relevance:0}]},k=[{
match:[t.concat(/\b/,l(...S)),/\??(?<=\.)/,a,o],scope:{3:"title.function.invoke"
},relevance:0},{match:[/^\s*/,l(...b),a,o],scope:{3:"title.function.invoke"},
relevance:0}],F={scope:"params",end:/\)/,endScope:"punctuation",relevance:0,
keywords:v,illegal:b,contains:[p,y,L,C,...R,{match:/\,|\(/,scope:"punctuation"
},w,{match:[/(?<=\(|\,)\s*/,a,/(?=\s)/],scope:{2:"type"}},{
match:[s,a,/\s*(?=[,)])/],scope:{2:"variable"}}]},Y=[{
begin:[/\btrigger/,s,a,s,"on",s,a],beginScope:{1:"keyword",3:"title.class",
5:"operator",7:"type"},end:/(?=\{)/,returnEnd:!0,contains:[L,{begin:/\(/,
2:"punctuation"},relevance:0}],f=[{match:t.concat(n,/\b(?!\s*\()/),scope:"meta"
},{scope:"meta",begin:[t.concat(n,/\b/),/\s*/,/\(/],beginScope:{3:"punctuation"
},end:/\)/,endScope:"punctuation",contains:[{match:[c,/\s*=/],scope:{
1:"keyword",2:"operator"},contains:[_]},D,p],keywords:{literal:S}}],k={
match:[/\b[a-zA-Z0-9\.]*Exception/,o,a],scope:{1:"title.class",3:"variable"},
relevance:0},F={match:[/(?<!\.)/,c,/\s*(?=\=[^\>])/],scope:{2:"variable"},
relevance:0},Y={match:[/(?<=\=\s*\()/,a,"(?=\\)\\s*"+a+")"],scope:{2:"type"},
relevance:0},P={match:[/\bnew\s+/,a,s],scope:{2:"type"},relevance:0};let W={
scope:"params_call",begin:/\(/,beginScope:"punctuation",end:/\)/,
endScope:"punctuation",relevance:0,keywords:y,contains:[]};const H=[{
match:[/(?<=\.)/,a,s],scope:{2:"title.function.invoke"},relevance:1,
contains:[...i],starts:W},{match:[/^\s*/,l(...b),a,s],scope:{
3:"title.function.invoke"},relevance:1,starts:W}]
;W.contains=[D,P,I,_,M,N,p,U,H,{keywords:{KEYWORDS:y},
match:t.concat(/(?<=\s|\(|\,)/,l(...S),a,/\b/,/(?!\.)/),scope:"variable",
relevance:0},{match:/\(|\,|\./,scope:"punctuation",relevance:0},{match:a,
scope:"variable"}];const x={scope:"params",end:/\)/,endScope:"punctuation",
relevance:1,keywords:y,contains:[p,D,I,M,...N,{match:/\,|\(/,scope:"punctuation"
},U,{match:[/(?<=\(|\,)\s*/,a,/(?=\s)/],scope:{2:"type"}},{
match:[o,a,/\s*(?=[,)])/],scope:{2:"variable"}}]},G=[{
begin:[/\btrigger/,o,a,o,"on",o,a],beginScope:{1:"keyword",3:"title.class",
5:"operator",7:"type"},end:/(?=\{)/,returnEnd:!0,contains:[I,{begin:/\(/,
end:/\)/,contains:[{
match:/\b(before|after)\s+(insert|update|delete|merge|undelete)\b/,
scope:"keyword",relevance:5},A]}]},{relevance:5,
scope:"keyword",relevance:5},T]}]},{relevance:5,
match:/\b(with|without|inherited)\s+sharing\b/,scope:"keyword"},{
begin:[/(?!\.)/,/\bclass\b(?!\?|\.)/],beginScope:{2:"keyword"},end:/(?=\{)/,
relevance:1,keywords:{type:d,keyword:b},contains:[{match:[/(?<=\bclass)\s+/,a],
relevance:1,keywords:{type:m,keyword:b},contains:[{match:[/(?<=\bclass)\s+/,a],
scope:{2:"title.class"}},{returnEnd:!0,endsWithParent:!0,
beginKeywords:"implements extends",end:/\{/,contains:[R,{match:[n,/(?=\.)/],
scope:{1:"built_in"}},{match:t.concat(n,/(?=>)/),scope:"type"},{
beginKeywords:"implements extends",end:/\{/,contains:[{
match:t.concat(/\b/,t.either("schedulable","batchable","queueable","comparable","callable"),/\b\s*(?!>)/),
scope:"title.class.inherited",relevance:8},{match:t.concat(n,/(?!<)/),
scope:"title.class.inherited"},{match:/<|>|,/,scope:"punctuation"}],relevance:0
}]},{begin:[/\benum\s+/,a,/\s*\{/],beginScope:{2:"type",3:"punctuation"},
end:/\}/,endScope:"punctuation",relevance:0,contains:[L,A,{match:t.concat(n),
scope:"variable.constant"}]},{match:[/(public|private|protected)\s+/,a,o],
scope:{1:"keyword",2:"title.function"},starts:F,relevance:0},{
match:[/(?<!new)(?<!return)(?<=\<|\>|\w)\s+/,a,o],scope:{2:"title.function"},
relevance:0,starts:F}],P={match:[/\bswitch\s+on\s+/,a],scope:{1:"keyword",
2:"variable"}},W={
keyword:[].concat(...v.keyword).concat("ABOVE_OR_BELOW","ACTIVE","ADVANCED","ALL","ANY","ARRAY","AS","ASC","BY","CATEGORY","CONTAINS","CUSTOM","DATA","DESC","DIVISION","END","FIELDS","FIND","FROM","LAST","METADATA","NETWORK","ON","ORDER","RETURNING","ROLLUP","ROWS","SEARCH","SELECT","SNIPPET","SORT","SPELL_CORRECTION","STANDARD","USER_MODE","WHERE","PricebookId","WITH","SECURITY_ENFORCED","USING","SCOPE","Delegated","Everything","Mine","My_Territory","My_Team_Territory","Team","TYPEOF","ELSE","END","THEN","WHEN").concat("ABOVE","AND","AT","BY","CATEGORY","DATA","FIRST","FOR","GROUP","HAVING","IN","LAST","LIKE","LIMIT","LISTVIEW","NOT","NULLS","OFFSET","OR","REFERENCE","TRACKING","TYPEOF","UPDATE","UPDATE","VIEW","VIEWSTAT"),
scope:"title.class.inherited",relevance:8},{match:[c,/(?=\.)/],scope:{
1:"built_in"}},{match:t.concat(c,/(?=\>)/),scope:"type"},{match:c,
scope:"title.class.inherited"},{match:/<|>|,/,scope:"punctuation"},N],
relevance:0}]},{begin:[/\benum\s+/,a,/\s*\{/],beginScope:{2:"type",
3:"punctuation"},end:/\}/,endScope:"punctuation",relevance:0,contains:[I,T,{
match:t.concat(c),scope:"variable.constant"}]},{
match:[/(public|private|protected)\s+/,a,s],scope:{1:"keyword",
2:"title.function"},starts:x,relevance:1},{
match:[/(?<!new)(?<!return)(?<=\<|\>|\w)\s+/,a,s],scope:{2:"title.function"},
relevance:1,starts:x}],B={match:[/\bswitch\s+on\s+/,a],scope:{1:"keyword",
2:"variable"}},K={
keyword:[].concat(...y.keyword).concat("ABOVE_OR_BELOW","ACTIVE","ADVANCED","ALL","ANY","ARRAY","AS","ASC","BY","CATEGORY","CONTAINS","CUSTOM","DATA","DESC","DIVISION","END","FIELDS","FIND","FROM","LAST","METADATA","NETWORK","ON","ORDER","RETURNING","ROLLUP","ROWS","SEARCH","SELECT","SNIPPET","SORT","SPELL_CORRECTION","STANDARD","USER_MODE","WHERE","PricebookId","WITH","SECURITY_ENFORCED","USING","SCOPE","Delegated","Everything","Mine","My_Territory","My_Team_Territory","Team","TYPEOF","ELSE","END","THEN","WHEN").concat("ABOVE","AND","AT","BY","CATEGORY","DATA","FIRST","FOR","GROUP","HAVING","IN","LAST","LIKE","LIMIT","LISTVIEW","NOT","NULLS","OFFSET","OR","REFERENCE","TRACKING","TYPEOF","UPDATE","UPDATE","VIEW","VIEWSTAT"),
type:["AVG","convertCurrency","convertTimezone","COUNT_DISTINCT","COUNT","DISTANCE","EXCLUDES","FORMAT","GEOLOCATION","GROUP BY CUBE","GROUP BY ROLLUP","GROUPING","INCLUDES","MAX","MIN","SUM","toLabel"],
"title.function":["DAY_IN_MONTH","HOUR_IN_DAY","DAY_IN_WEEK","DAY_IN_YEAR","DAY_ONLY","CALENDAR_MONTH","CALENDAR_QUARTER","CALENDAR_YEAR","FISCAL_MONTH","FISCAL_QUARTER","FISCAL_YEAR","TODAY","TOMORROW","YESTERDAY","WEEK_IN_MONTH","WEEK_IN_YEAR"],
literal:v.literal,built_in:S};return{name:"Apex",
literal:y.literal,built_in:g};return{name:"Apex",
aliases:["apex","lightning","soql"],case_insensitive:!0,disableAutodetect:!1,
ignoreIllegals:!1,keywords:v,
ignoreIllegals:!1,keywords:y,
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\$/,/\b_/,"::=",/\s#[a-zA-Z]/,/\s_[a-zA-Z]/,/\s\$[a-zA-Z]/,"#if","%if",/\bif(?!\s+\()/,"%endif","#endif","#_",/\d\s+\d/,/\w::\w/,/\bfloat\b/,/(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:[D,U,C,L,Y,[{match:/as\s+(user|system)\b/,scope:"keyword"}],i,I,{
match:[/\bfor\b\s*/,/\(/,a,s,a,/\s*/,/:/],scope:{3:"type",5:"variable",
7:"operator"}},k,M,T,R,p,N,f,g,w,{begin:[/\[/,/\s*(?=(SELECT|FIND)\b)/],
end:/\]/,beginScope:{1:"punctuation"},endScope:"punctuation",scope:"soql",
relevance:10,endsWithParent:!0,keywords:W,contains:[{begin:/\bSELECT\b/,
beginScope:"keyword",end:/\bFROM\b/,returnEnd:!0,keywords:W,contains:[A,{
match:[/(?=[\s\,])/,a,/(?=[\s\,])/],scope:{2:"subst"}}]},p,N,y,A,{match:/\(|\)/,
scope:"punctuation",relevance:0},...i,{begin:[/\bFROM\b/,s],beginScope:{
contains:[I,f,D,p,Y,M,G,[{match:/as\s+(user|system)\b/,scope:"keyword"}],k,{
match:[/\bfor\b\s*/,/\(/,a,o,a,/\s*/,/:/],scope:{3:"type",5:"variable",
7:"operator"}},H,P,L,N,U,{begin:[/\[/,/\s*(?=(SELECT|FIND)\b)/],end:/\]/,
beginScope:{1:"punctuation"},endScope:"punctuation",scope:"soql",relevance:10,
endsWithParent:!0,keywords:K,contains:[{begin:/\bSELECT\b/,beginScope:"keyword",
end:/\bFROM\b/,returnEnd:!0,keywords:K,contains:[T,{
match:[/(?=[\s\,])/,a,/(?=[\s\,])/],scope:{2:"subst"}}]},p,_,D,T,{match:/\(|\)/,
scope:"punctuation",relevance:0},...i,{begin:[/\bFROM\b/,o],beginScope:{
1:"keyword"},end:/(?=\bWHERE\b|\]|\s|\))/,contains:[{match:a,scope:"type"},...i]
},{
match:/(NEXT|LAST|THIS)_(90_DAY|DAY|FISCAL_QUARTER|FISCAL_YEAR|MONTH|QUARTER|WEEK|YEAR)S?\b/,
scope:"keyword",relevance:8},{
match:[/(NEXT|LAST)_N_(DAY|FISCAL_QUARTER|FISCAL_YEAR|MONTH|QUARTER|WEEK|YEAR)S/,/\s*:\s*/,/\d+/],
scope:{1:"keyword",2:"operator",3:"number"},relevance:8},{
match:[/(?<=:)/,/\s*/,n,/(?!\()/],scope:{3:"variable"},relevance:0},{
match:[/(?<=:)/,/\s*/,c,/(?!\()/],scope:{3:"variable"},relevance:0},{
match:[/(?<=:|\.)/,a,/(?=\s*\()/],scope:{2:"title.function.invoke"},relevance:0
},{match:/:/,scope:"operator",relevance:0}],illegal:"::"},y,P,_]}}})()
;export default hljsGrammar;
},{match:/:/,scope:"operator",relevance:0}],illegal:"::"},B,F,_,C,i,{
match:t.concat("(?<=this.)",a,"(?!\\()"),scope:"variable"},{
match:[t.concat(/\b/,l(...O)),a,o,/(?=\{)/],scope:{2:"property"},relevance:0}]}}
})();export default hljsGrammar;
Loading