Skip to content

Commit

Permalink
fix: include interface in class declaration (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschach committed Nov 9, 2023
1 parent 87b56a8 commit 51037bd
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 41 deletions.
32 changes: 16 additions & 16 deletions dist/apex.es.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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=["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"],R={
},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","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"],R={
match:/,/,scope:"punctuation",relevance:0
},T=[/--/,/\+\+/,/\&\&|\|\|/,/\*\=|\/\=|\%\=|\+\=|-\=/,/\&\=|\^\=|<<\=|>>\=|>>>\=|\|\=/,/\&|~|\^|\|/,/<<|>>/,/<\=|>\=|\s(<|>)\s/,/\=\=|!\=/,/\=>/,/!(?=\w)/,/(?<=\s)(\?|:)(?=\s)/,r,/(?<!\?)\?(?!\?|\.|\[)/,/%[^%]|\*[^\/]|\/[^\/\*]|(?<!\-)\-(?!\-)|(?<!\+)\+(?!\+)/,/(?<!\=|!)\=(?!\=|>)/],g=A.concat(...h),y={
$pattern:t.concat(/(?<!\.)\b/,a,/(?!\s*\()/),keyword:[...b,...d,...E],
Expand Down Expand Up @@ -45,7 +45,7 @@ match:[t.optional(c),/\[/,t.optional(/\d+/),/\]/],scope:{1:"variable",
},{scope:"meta",begin:[t.concat(n,/\b/),/\s*/,/\(/],beginScope:{3:"punctuation"
},end:/\)/,endScope:"punctuation",contains:[{match:[c,/\s*=/],scope:{
1:"keyword",2:"operator"},contains:[_]},C,p],keywords:{literal:S}}],k={
match:[/\b[a-zA-Z0-9\.]*Exception/,s,a],scope:{1:"title.class",3:"variable"},
match:[/\b[a-zA-Z0-9\.]*Exception/,s,a],scope:{1:"type",3:"variable"},
relevance:0},F={match:[/(?<!\.)/,c,/\s*(?=\=[^\>])/],scope:{2:"variable"},
relevance:0},P={match:[/(?<=\=\s*\()/,a,"(?=\\)\\s*"+a+")"],scope:{2:"type"},
relevance:0},Y={match:[/\bnew\s+/,a,o],scope:{2:"type"},relevance:0};let W={
Expand All @@ -71,15 +71,15 @@ contains:[I,{begin:/\(/,end:/\)/,contains:[{
match:/\b(before|after)\s+(insert|update|delete|merge|undelete)\b/,
scope:"keyword",relevance:5},R]}]},{relevance:5,
match:/\b(with|without|inherited)\s+sharing\b/,scope:"keyword"},{
begin:[/(?!\.)/,/\bclass\b(?!\?|\.)/],beginScope:{2:"keyword"},end:/(?=\{)/,
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:[{match:[c,/(?=\.)/],
scope:{1:"built_in"}},{match:t.concat(c,/(?=\>)/),scope:"type"},{match:c,
scope:"title.class.inherited"},{match:/<|>|,/,scope:"punctuation"},O],
relevance:0}]},{begin:[/\benum\s+/,a,/\s*\{/],beginScope:{2:"type",
3:"punctuation"},end:/\}/,endScope:"punctuation",relevance:0,contains:[I,R,{
match:t.concat(c),scope:"variable.constant"}]},{
begin:[/(?!\.)/,/\b(class|interface)\b(?!\?|\.)/],beginScope:{2:"keyword"},
end:/(?=\{)/,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:[{
match:[c,/(?=\.)/],scope:{1:"built_in"}},{match:t.concat(c,/(?=\>)/),
scope:"type"},{match:c,scope:"title.class.inherited"},{match:/<|>|,/,
scope:"punctuation"},O],relevance:0}]},{begin:[/\benum\s+/,a,/\s*\{/],
beginScope:{2:"type",3:"punctuation"},end:/\}/,endScope:"punctuation",
relevance:0,contains:[I,R,{match:t.concat(c),scope:"variable.constant"}]},{
match:[/(public|private|protected)\s+/,a,o],scope:{1:"keyword",
2:"title.function"},starts:x,relevance:1},{
match:[/(?<!new)(?<!return)(?<=\<|\>|\w)\s+/,a,o],scope:{2:"title.function"},
Expand All @@ -100,8 +100,8 @@ match:[/(NEXT|LAST)_N_(DAY|FISCAL_QUARTER|FISCAL_YEAR|MONTH|QUARTER|WEEK|YEAR)S/
scope:{1:"keyword",2:"operator",3:"number"},relevance:8},{
match:t.concat(/\b/,t.either(...y.keyword,"ABOVE_OR_BELOW","ABOVE","ACTIVE","ADVANCED","ALL","ANY","ARRAY","AS","ASC","BELOW","CATEGORY","CONTAINS","CUSTOM","DATA","DESC","DIVISION","ELSE","END","FIND","FROM","METADATA","NETWORK","ON","PricebookId","RETURNING","ROLLUP","ROWS","SEARCH","SECURITY_ENFORCED","SELECT","SNIPPET","SORT","SPELL_CORRECTION","STANDARD","THEN","USER_MODE","USING","WHEN","WHERE","WITH","SCOPE","Delegated","Everything","Mine","My_Territory","My_Team_Territory","Team","AND","AT","FIRST","FOR","HAVING","IN","LAST","LIKE","LIMIT","LISTVIEW","NOT","NULLS","OFFSET","OR","REFERENCE","TRACKING","TYPEOF","UPDATE","VIEW","VIEWSTAT"),/\b/),
scope:"keyword"},{match:[/(?<=:)/,/\s*/,c,/(?!\()/],scope:{3:"variable"},
relevance:0},O,{match:[/(?<=:|\.)/,a,/(?=\s*\()/],scope:{
2:"title.function.invoke"},relevance:0},{match:/:/,scope:"operator",relevance:0
}],illegal:"::"},G,F,_,w,i,{match:t.concat("(?<=this.)",a,"(?!\\()"),
scope:"variable"},{match:[t.concat(/\b/,l(...L)),a,s,/(?=\{)/],scope:{
2:"property"},relevance:0}]}}})();export default hljsGrammar;
relevance:0},{match:[/(?<=:|\.)/,a,/(?=\s*\()/],scope:{2:"title.function.invoke"
},relevance:0},{match:/:/,scope:"operator",relevance:0}],illegal:"::"
},G,F,_,w,i,{match:t.concat("(?<=this.)",a,"(?!\\()"),scope:"variable"},{
match:[t.concat(/\b/,l(...L)),a,s,/(?=\{)/],scope:{2:"property"},relevance:0}]}}
})();export default hljsGrammar;
Loading

0 comments on commit 51037bd

Please sign in to comment.