Skip to content

Commit

Permalink
it works
Browse files Browse the repository at this point in the history
  • Loading branch information
dschach committed Oct 24, 2023
1 parent 8dc370e commit 777703e
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 56 deletions.
34 changes: 17 additions & 17 deletions dist/apex.es.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,26 @@ scope:{2:"title.class"},relevance:9},{
match:[/\b/,t.either("Callable","Comparable","Comparator","HttpCalloutMock","InstallHandler","Queueable","QueueableContext","SandboxPostCopy","Schedulable","SchedulableContext","StubProvider","UninstallHandler","WebServiceMock"),/\b/],
scope:{2:"title.class.inherited"},relevance:10}],h={
match:[/\bswitch\s+on\s+/,a],scope:{1:"keyword",2:"variable"}},S={
match:t.concat(/\s*\(/,t.either(/(?<!=|!)=(?!=|>)/,/(--)/,/(\!|&&|\|\|)/,/(\*=|\/=|%=|\+=|-=)/,/(\&=|\^=|<<=|>>=|\|=)/,/(\&|~|\^|\|)/,/(\+\+)/,/(\=)/,/(%[^%]|\*[^\/]|\/[^\/\*]|-|\+)/,/(<<|>>)/,/(<=|>=|\s(<|>)\s)/,/(==|!=)/,/(=>)/,/(!(?=\w))/,/(\&\&)/,/((?<=\s)(\?|:)(?=\s))/,/(\?\.)/,/(?<!\?)\?(?!\?|\.|\[)/),/\){1}\s*/),
scope:"operator main",relevance:0},A={match:t.either(/(\{|\})/,",",/\(|\)/,";"),
match:t.concat("("+t.either(/(?<=')\s*\+/,/\+(?=\s*')/,/(?<!=|!)(\=)(?!=|>)/,/(--)/,/(\!|&&|\|\|)/,/(\*=|\/=|%=|\+=|-=)/,/(\&=|\^=|<<=|>>=|\|=)/,/(\&|~|\^|\|)/,/(\+\+)/,/(%[^%]|\*[^\/]|\/[^\/\*]|-|\+)/,/(<<|>>)/,/(<=|>=|\s(<|>)\s)/,/(==|!=)/,/=>/,/(!(?=\w))/,/(\&\&)/,/((?<=\s)(\?|:)(?=\s))/,/(\?\.)/,/(?<!\?)\?(?!\?|\.|\[)/)+"){1}"),
scope:"operator",relevance:0},A={match:t.either(/(\{|\})/,",",/\(|\)/,";"),
scope:"punctuation",relevance:0},E=e.COMMENT("//",/[$\n]/,{relevance:0
}),g=e.COMMENT("/\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{
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,{className:"meta string"}),{
match:[/(?<=@param)/,/\s+/,/\S+/],scope:{3:"variable"}},{
match:[/@(?:exception|throws)/,/\s+/,/\S+/],scope:{1:"doctag",3:"class.title"}}]
}),v=[{match:t.concat(n,/\b(?!\s*\()/),scope:"meta SOLO"},{
}),v=[{match:t.concat(n,/\b(?!\s*\()/),scope:"meta"},{
begin:[t.concat(n,/\b/),/\s*\(/],beginScope:{1:"meta",2:"punctuation"},end:/\)/,
endScope:"punctuation end",scope:"annotation",contains:[{
endScope:"punctuation",scope:"annotation",contains:[{
match:[t.concat(/\b/,a),/(?=\s*=)/],scope:{1:"meta keyword"},contains:[S]
},e.inherit(e.APOS_STRING_MODE,{className:"meta string"}),c],keywords:{literal:o
}}],T=[{match:[/\b[a-zA-Z0-9\.]*Exception\b/,/\s+/,a],scope:{1:"title.class",
3:"variable"},relevance:0}],R=[{scope:"collection",
3:"variable"},relevance:0}],_=[{scope:"collection",
begin:/\b(list|set|map)\s*(?=<)/,beginScope:"type",end:/>+/,
endScope:"punctuation",contains:[{match:/</,scope:"punctuation"},A,{
match:t.concat(/\b/,a,/\b/),scope:"type"}],relevance:10},{match:[a,/\s*\[\]/],
scope:{1:"type",2:"punctuation"},contains:[A]}],_=[{
scope:{1:"type",2:"punctuation"},contains:[A]}],R=[{
match:[a,/\s+/,a,/(?=\s*=)/],scope:{1:"type",3:"variable assigned"},relevance:0,
contains:[A,S]},{match:[a,/\s+/,a,/\s+/,";"],scope:{1:"type",3:"variable"},
relevance:0,contains:[A,S]},{match:[/\s+/,a,/\s+/,/(?==)/],scope:{
Expand All @@ -55,15 +55,15 @@ scope:{1:"type",2:"property"}},{
match:[t.concat(/\b/,a,/\b/),/(?=\s+\{\s*(public|private)?\s*(get|set)\b)/],
scope:{1:"property"}}],N={scope:"params",begin:/\(/,beginScope:"punctuation",
end:/\)/,endScope:"punctuation",endsParent:!0,
contains:[c,e.APOS_STRING_MODE,E,g,S,_,R,{
contains:[c,e.APOS_STRING_MODE,E,g,S,R,_,{
match:t.concat(/\b/,t.either(...o),/\b\s*(?=[,)])/),scope:"literal"},{
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=[{
begin:[/\bnew\b/,/\s+/,a,/\s*(?=\()/],beginScope:{1:"keyword",
3:"title.function.invoke"},end:/\)/,returnEnd:!0,scope:"instantiate",
contains:[N,E,A],illegal:":"}],I={end:/(?=\)\s*[^{])/,returnEnd:!0,
scope:"method call",variants:[{begin:t.concat(a,/(?=\s*\()/),
scope:"method_call",variants:[{begin:t.concat(a,/(?=\s*\()/),
beginScope:"title.function.invoke"},{
begin:[t.either(...p),/\./,t.concat(a,/(?=\s*\()/)],beginScope:{1:"built_in",
3:"title.function.invoke"}},{begin:[a,/\./,t.concat(a,/(?=\s*\()/)],beginScope:{
Expand All @@ -77,7 +77,7 @@ scope:"trigger_declaration",contains:[E,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"}]}]},M={begin:[/\bclass\b/,/\s+/,a],beginScope:{1:"keyword",
3:"title.class"},end:/\{/,returnEnd:!0,scope:"class-declaration",keywords:{
3:"title.class"},end:/\{/,returnEnd:!0,scope:"class_declaration",keywords:{
type:r,keyword:["extends","implements"]},contains:[{variants:[{
begin:/\b(implements)\b/,beginScope:"keyword",end:/\b(extends)\b/},{
begin:/\b(extends)\b/,beginScope:"keyword",end:/\b(implements)\b/},{end:/\{/,
Expand All @@ -89,19 +89,19 @@ match:[/\b/,a,/\./,a,/(?=[,\s<])/],scope:{2:"built_in",4:"title.class.inherited"
scope:"title.class.inherited"}]}]},U=[C,{relevance:10,
match:/\b(with|without|inherited)\s+sharing\b/,scope:"keyword"},L,{
begin:[/\benum\s+/,a,/\s*/,/\{/],beginScope:{1:"type",2:"type",4:"punctuation"},
end:/[\}\n]/,endScope:"punctuation",scope:"enum declaration",relevance:0,
end:/[\}\n]/,endScope:"punctuation",scope:"enum_declaration",relevance:0,
contains:[E,g,A,{match:t.concat(/\b/,a,/\b/),scope:"variable.constant"}]
}].concat(M),w=[{match:[/(?<=\breturn\b)\s+/,t.either(o),/(?=\s*;)/],scope:{
2:"literal"}},{match:[/(?<=return)/,/\s+/,a,/(?=\s*;)/],scope:{3:"variable"}},{
match:[/(?<=return)/,/\s+/,t.lookahead(a+/\(/)],scope:{2:"title.function.invoke"
}}],f={begin:[/\[/,/\s*/,/\b(SELECT|FIND)\b/],beginScope:{1:"punctuation",
3:"keyword for 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"}},A]},{match:/\]/,scope:"punctuation",
endsParent:!0},{match:/\b\s*IN|=\s*:/,scope:"operator"},{
3:"keyword soql"},end:/\]/,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"}},A]},{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",relevance:0},{
scope:"keyword soql",relevance:0},{
match:t.concat(/\b/,t.either("ABOVE","AND","ASC","AT","DESC","HAVING","IN","LIKE","LIMIT","LISTVIEW","NOT","OFFSET","OR","TRACKING","TYPEOF","UPDATE","VIEWSTAT",/FOR\s+REFERENCE/,/FOR\s+UPDATE/,/FOR\s+VIEW/,/GROUP\s+BY/,/NOT\s+IN/,/NULLS\s+(FIRST|LAST)/,/ORDER\s+BY/,/WITH/,/DATA\s+CATEGORY/,/WITH\s+PricebookId/),/\b/),
scope:"operator soql",relevance:0},{
match:t.concat(/\b/,t.either("AVG","convertCurrency","convertTimezone","COUNT_DISTINCT","COUNT","DAY_IN_MONTH","DAY_IN_WEEK","DAY_IN_YEAR","DAY_ONLY","DISTANCE","EXCLUDES","FORMAT","GEOLOCATION","GROUP BY CUBE","GROUP BY ROLLUP","GROUPING","HOUR_IN_DAY","INCLUDES","MAX","MIN","SUM","toLabel","WEEK_IN_MONTH","WEEK_IN_YEAR"),/\b/),
Expand All @@ -120,7 +120,7 @@ disableAutodetect:!1,ignoreIllegals:!1,keywords:{$pattern:a,keyword:s,
"variable.language":["instanceof","new","super","this"],built_in:l,type:r,
literal:o,classNameAliases:{soql:"subst"}},
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+\*/,/\bint\b/,/import\s+\w+\s+=\s+require\("\w+"\)/,"/^include\b/",/\buse\s+strict\b/,/\w+\s+=\s+"\S*";/,/\/include\//,/\Anamespace\b/,/\bend\.\n/,/\bend\n/,'"""',/\+\+\+/,/<%/,"<%#","%%>","<%%"],
contains:[v,_,R,g,E,O,U,[{
contains:[v,R,_,g,E,O,U,[{
match:[t.concat(/\b/,t.either(...b),/\b/),/\s*/,a,/(?=;)/],scope:{1:"built_in",
3:"variable"}},{match:t.concat(/\b/,t.either(...b),/\b/),scope:"built_in"},{
match:[/\s+/,/(?:\bas\s+(user|system)\b\s+)?/,a,t.lookahead(";")],scope:{
Expand Down
48 changes: 24 additions & 24 deletions dist/apex.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,26 @@ scope:{2:"title.class"},relevance:9},{
match:[/\b/,t.either("Callable","Comparable","Comparator","HttpCalloutMock","InstallHandler","Queueable","QueueableContext","SandboxPostCopy","Schedulable","SchedulableContext","StubProvider","UninstallHandler","WebServiceMock"),/\b/],
scope:{2:"title.class.inherited"},relevance:10}],h={
match:[/\bswitch\s+on\s+/,a],scope:{1:"keyword",2:"variable"}},S={
match:t.concat(/\s*\(/,t.either(/(?<!=|!)=(?!=|>)/,/(--)/,/(\!|&&|\|\|)/,/(\*=|\/=|%=|\+=|-=)/,/(\&=|\^=|<<=|>>=|\|=)/,/(\&|~|\^|\|)/,/(\+\+)/,/(\=)/,/(%[^%]|\*[^\/]|\/[^\/\*]|-|\+)/,/(<<|>>)/,/(<=|>=|\s(<|>)\s)/,/(==|!=)/,/(=>)/,/(!(?=\w))/,/(\&\&)/,/((?<=\s)(\?|:)(?=\s))/,/(\?\.)/,/(?<!\?)\?(?!\?|\.|\[)/),/\){1}\s*/),
scope:"operator main",relevance:0},A={match:t.either(/(\{|\})/,",",/\(|\)/,";"),
match:t.concat("("+t.either(/(?<=')\s*\+/,/\+(?=\s*')/,/(?<!=|!)(\=)(?!=|>)/,/(--)/,/(\!|&&|\|\|)/,/(\*=|\/=|%=|\+=|-=)/,/(\&=|\^=|<<=|>>=|\|=)/,/(\&|~|\^|\|)/,/(\+\+)/,/(%[^%]|\*[^\/]|\/[^\/\*]|-|\+)/,/(<<|>>)/,/(<=|>=|\s(<|>)\s)/,/(==|!=)/,/=>/,/(!(?=\w))/,/(\&\&)/,/((?<=\s)(\?|:)(?=\s))/,/(\?\.)/,/(?<!\?)\?(?!\?|\.|\[)/)+"){1}"),
scope:"operator",relevance:0},A={match:t.either(/(\{|\})/,",",/\(|\)/,";"),
scope:"punctuation",relevance:0},g=e.COMMENT("//",/[$\n]/,{relevance:0
}),E=e.COMMENT("/\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{
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,{className:"meta string"}),{
match:[/(?<=@param)/,/\s+/,/\S+/],scope:{3:"variable"}},{
match:[/@(?:exception|throws)/,/\s+/,/\S+/],scope:{1:"doctag",3:"class.title"}}]
}),v=[{match:t.concat(n,/\b(?!\s*\()/),scope:"meta SOLO"},{
}),v=[{match:t.concat(n,/\b(?!\s*\()/),scope:"meta"},{
begin:[t.concat(n,/\b/),/\s*\(/],beginScope:{1:"meta",2:"punctuation"},end:/\)/,
endScope:"punctuation end",scope:"annotation",contains:[{
endScope:"punctuation",scope:"annotation",contains:[{
match:[t.concat(/\b/,a),/(?=\s*=)/],scope:{1:"meta keyword"},contains:[S]
},e.inherit(e.APOS_STRING_MODE,{className:"meta string"}),c],keywords:{literal:o
}}],T=[{match:[/\b[a-zA-Z0-9\.]*Exception\b/,/\s+/,a],scope:{1:"title.class",
3:"variable"},relevance:0}],R=[{scope:"collection",
3:"variable"},relevance:0}],_=[{scope:"collection",
begin:/\b(list|set|map)\s*(?=<)/,beginScope:"type",end:/>+/,
endScope:"punctuation",contains:[{match:/</,scope:"punctuation"},A,{
match:t.concat(/\b/,a,/\b/),scope:"type"}],relevance:10},{match:[a,/\s*\[\]/],
scope:{1:"type",2:"punctuation"},contains:[A]}],_=[{
scope:{1:"type",2:"punctuation"},contains:[A]}],R=[{
match:[a,/\s+/,a,/(?=\s*=)/],scope:{1:"type",3:"variable assigned"},relevance:0,
contains:[A,S]},{match:[a,/\s+/,a,/\s+/,";"],scope:{1:"type",3:"variable"},
relevance:0,contains:[A,S]},{match:[/\s+/,a,/\s+/,/(?==)/],scope:{
Expand All @@ -55,20 +55,20 @@ scope:{1:"type",2:"property"}},{
match:[t.concat(/\b/,a,/\b/),/(?=\s+\{\s*(public|private)?\s*(get|set)\b)/],
scope:{1:"property"}}],N={scope:"params",begin:/\(/,beginScope:"punctuation",
end:/\)/,endScope:"punctuation",endsParent:!0,
contains:[c,e.APOS_STRING_MODE,g,E,S,_,R,{
contains:[c,e.APOS_STRING_MODE,g,E,S,R,_,{
match:t.concat(/\b/,t.either(...o),/\b\s*(?=[,)])/),scope:"literal"},{
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"}}]},L=[{
3:"variable"}},{match:[a,/\s*(?=[,)])/],scope:{1:"variable"}}]},D=[{
begin:[/\bnew\b/,/\s+/,a,/\s*(?=\()/],beginScope:{1:"keyword",
3:"title.function.invoke"},end:/\)/,returnEnd:!0,scope:"instantiate",
contains:[N,g,A],illegal:":"}],D={end:/(?=\)\s*[^{])/,returnEnd:!0,
scope:"method call",variants:[{begin:t.concat(a,/(?=\s*\()/),
contains:[N,g,A],illegal:":"}],I={end:/(?=\)\s*[^{])/,returnEnd:!0,
scope:"method_call",variants:[{begin:t.concat(a,/(?=\s*\()/),
beginScope:"title.function.invoke"},{
begin:[t.either(...p),/\./,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,E,e.APOS_STRING_MODE,N,L],relevance:0,illegal:[].concat(...s)},I={
contains:[g,E,e.APOS_STRING_MODE,N,D],relevance:0,illegal:[].concat(...s)},L={
match:[/\bTrigger\b/,/\./,t.either("isExecuting","isInsert","isUpdate","isDelete","isBefore","isAfter","isUndelete","new","newMap","old","oldMap","size","operationType"),/\b/],
scope:{1:"built_in",3:"keyword"},relevance:10},C={
begin:[/\btrigger/,/\s+/,a,/\s+/,"on",/\s+/,a],beginScope:{1:"keyword",
Expand All @@ -77,7 +77,7 @@ scope:"trigger_declaration",contains:[g,E,{begin:/\(/,beginScope:"punctuation",
end:/\)/,endScope:"punctuation",scope:"trigger_params",contains:[{
match:/\b(before|after)\s+(insert|update|delete|merge|undelete)\b/,
scope:"built_in"}]}]},M={begin:[/\bclass\b/,/\s+/,a],beginScope:{1:"keyword",
3:"title.class"},end:/\{/,returnEnd:!0,scope:"class-declaration",keywords:{
3:"title.class"},end:/\{/,returnEnd:!0,scope:"class_declaration",keywords:{
type:r,keyword:["extends","implements"]},contains:[{variants:[{
begin:/\b(implements)\b/,beginScope:"keyword",end:/\b(extends)\b/},{
begin:/\b(extends)\b/,beginScope:"keyword",end:/\b(implements)\b/},{end:/\{/,
Expand All @@ -87,21 +87,21 @@ match:t.concat(/\b/,t.either(...l),/\b\s*(?!>)/),scope:"title.class.inherited"
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"}]}]},U=[C,{relevance:10,
match:/\b(with|without|inherited)\s+sharing\b/,scope:"keyword"},I,{
match:/\b(with|without|inherited)\s+sharing\b/,scope:"keyword"},L,{
begin:[/\benum\s+/,a,/\s*/,/\{/],beginScope:{1:"type",2:"type",4:"punctuation"},
end:/[\}\n]/,endScope:"punctuation",scope:"enum declaration",relevance:0,
end:/[\}\n]/,endScope:"punctuation",scope:"enum_declaration",relevance:0,
contains:[g,E,A,{match:t.concat(/\b/,a,/\b/),scope:"variable.constant"}]
}].concat(M),w=[{match:[/(?<=\breturn\b)\s+/,t.either(o),/(?=\s*;)/],scope:{
2:"literal"}},{match:[/(?<=return)/,/\s+/,a,/(?=\s*;)/],scope:{3:"variable"}},{
match:[/(?<=return)/,/\s+/,t.lookahead(a+/\(/)],scope:{2:"title.function.invoke"
}}],f={begin:[/\[/,/\s*/,/\b(SELECT|FIND)\b/],beginScope:{1:"punctuation",
3:"keyword for 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"}},A]},{match:/\]/,scope:"punctuation",
endsParent:!0},{match:/\b\s*IN|=\s*:/,scope:"operator"},{
3:"keyword soql"},end:/\]/,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"}},A]},{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",relevance:0},{
scope:"keyword soql",relevance:0},{
match:t.concat(/\b/,t.either("ABOVE","AND","ASC","AT","DESC","HAVING","IN","LIKE","LIMIT","LISTVIEW","NOT","OFFSET","OR","TRACKING","TYPEOF","UPDATE","VIEWSTAT",/FOR\s+REFERENCE/,/FOR\s+UPDATE/,/FOR\s+VIEW/,/GROUP\s+BY/,/NOT\s+IN/,/NULLS\s+(FIRST|LAST)/,/ORDER\s+BY/,/WITH/,/DATA\s+CATEGORY/,/WITH\s+PricebookId/),/\b/),
scope:"operator soql",relevance:0},{
match:t.concat(/\b/,t.either("AVG","convertCurrency","convertTimezone","COUNT_DISTINCT","COUNT","DAY_IN_MONTH","DAY_IN_WEEK","DAY_IN_YEAR","DAY_ONLY","DISTANCE","EXCLUDES","FORMAT","GEOLOCATION","GROUP BY CUBE","GROUP BY ROLLUP","GROUPING","HOUR_IN_DAY","INCLUDES","MAX","MIN","SUM","toLabel","WEEK_IN_MONTH","WEEK_IN_YEAR"),/\b/),
Expand All @@ -112,22 +112,22 @@ 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,D,S,A,e.APOS_STRING_MODE],
match:[/(?<=:)/,/\s*/,a],scope:{3:"variable"}},c,I,S,A,e.APOS_STRING_MODE],
illegal:"::"},k={begin:[/\bfor\b/,/\s*\(/,a,/\s+/,a,/\s*:/],beginScope:{
2:"punctuation",3:"type",5:"variable",6:"operator"},end:"{",contains:[g,E,f]}
;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:l,type:r,
literal:o,classNameAliases:{soql:"subst"}},
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+\*/,/\bint\b/,/import\s+\w+\s+=\s+require\("\w+"\)/,"/^include\b/",/\buse\s+strict\b/,/\w+\s+=\s+"\S*";/,/\/include\//,/\Anamespace\b/,/\bend\.\n/,/\bend\n/,'"""',/\+\+\+/,/<%/,"<%#","%%>","<%%"],
contains:[v,_,R,E,g,O,U,[{
contains:[v,R,_,E,g,O,U,[{
match:[t.concat(/\b/,t.either(...b),/\b/),/\s*/,a,/(?=;)/],scope:{1:"built_in",
3:"variable"}},{match:t.concat(/\b/,t.either(...b),/\b/),scope:"built_in"},{
match:[/\s+/,/(?:\bas\s+(user|system)\b\s+)?/,a,t.lookahead(";")],scope:{
2:"built_in",3:"variable"}},{begin:t.concat(/\b/,t.either(...b),/\b/),
beginScope:"built_in",scope:"DML",contains:[L,{
beginScope:"built_in",scope:"DML",contains:[D,{
match:[t.concat("(?<=",t.either(b),")"),/\s+/,/(?:\bas\s+(user|system)\b\s+)?/,a,t.lookahead(";")],
scope:{3:"built_in",4:"variable"}},{match:t.either(b),scope:"built_in"},A]},{
match:["AccessLevel",/\./,/(SYSTEM_MODE|USER_MODE)/],scope:{1:"built_in",
3:"keyword"}}],T,k,e.APOS_STRING_MODE,L,D,m,c,S,y,A,w,{match:/(?<!\.)\bId\b/,
3:"keyword"}}],T,k,e.APOS_STRING_MODE,D,I,m,c,S,y,A,w,{match:/(?<!\.)\bId\b/,
scope:"type",relevance:8},f,i,h]}}})();hljs.registerLanguage("apex",e)})();
Loading

0 comments on commit 777703e

Please sign in to comment.