diff --git a/dist/apex.es.min.js b/dist/apex.es.min.js index 085ec5e..d2af04a 100644 --- a/dist/apex.es.min.js +++ b/dist/apex.es.min.js @@ -22,8 +22,8 @@ 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))/,/(\?\.)/,/(?)/,/(--)/,/(\!|&&|\|\|)/,/(\*=|\/=|%=|\+=|-=)/,/(\&=|\^=|<<=|>>=|\|=)/,/(\&|~|\^|\|)/,/(\+\+)/,/(%[^%]|\*[^\/]|\/[^\/\*]|-|\+)/,/(<<|>>)/,/(<=|>=|\s(<|>)\s)/,/(==|!=)/,/=>/,/(!(?=\w))/,/(\&\&)/,/((?<=\s)(\?|:)(?=\s))/,/(\?\.)/,/(?+/, 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:{ @@ -55,7 +55,7 @@ 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", @@ -63,7 +63,7 @@ match:[t.concat(/(?<=[,\(])\s*/,a),/\./,a,/\s*(?=[,)])/],scope:{1:"variable", 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:{ @@ -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:/\{/, @@ -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/), @@ -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:["","<#","<]","