Skip to content

Commit fa67d05

Browse files
committed
fix: rename variable classes from debug temp names
1 parent ef4ea46 commit fa67d05

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

dist/apex.es.min.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ $pattern:t.concat(/(?<!\.)\b/,a,/\b/),keyword:[...b,...d,...E],type:m,literal:S
1313
},L=[...S,...b,...d,...A,...h,...v,...u,...E],N={
1414
match:t.concat(/\b/,t.either(...u),/\b/),scope:"variable.language",relevance:0
1515
},O=[{match:[t.concat(/\b/,t.either(...v)),/\./,a,/\b\s*(?![\.\(])/],scope:{
16-
1:"built_in",2:"punctuation",3:"variable1"},relevance:0},{
16+
1:"built_in",2:"punctuation",3:"variable"},relevance:0},{
1717
match:[t.concat(/\b/,t.either(...h)),/\./,a,/\b\s*(?![\.\(])/],scope:{
1818
1:"built_in",2:"punctuation",3:"type"},relevance:0},{
1919
match:[t.concat(/\b/,t.either(...A)),/\./,c,/\b(?=\.)/],scope:{1:"built_in",
@@ -32,7 +32,7 @@ scope:"string",relevance:0,contains:[{match:/\\'/,scope:"literal",relevance:0}]
3232
relevance:0,contains:[{begin:/\w+@/,relevance:0},{
3333
match:[/@(?:exception|throws)/,s,a],scope:{1:"doctag",3:"title.class"},
3434
relevance:0},{begin:"@[A-Za-z_-]+",scope:"doctag",relevance:0},{
35-
match:[/(?<=@param)\s+/,a],scope:{2:"variable2"},relevance:0},{excludeBegin:!0,
35+
match:[/(?<=@param)\s+/,a],scope:{2:"variable"},relevance:0},{excludeBegin:!0,
3636
excludeEnd:!0,contains:[e.BACKSLASH_ESCAPE],relevance:0,variants:[{begin:"`",
3737
end:"`",scope:"subst"},{begin:/'/,end:/'/,scope:"string"}]}]}),D],_={
3838
match:t.either(...T),scope:"operator",relevance:0},U={match:/(?<!\.)\bId\b/,
@@ -46,7 +46,7 @@ match:[t.optional(c),/\[/,t.optional(/\d+/),/\]/],scope:{1:"variable",
4646
},end:/\)/,endScope:"punctuation",contains:[{match:[c,/\s*=/],scope:{
4747
1:"keyword",2:"operator"},contains:[_]},C,p],keywords:{literal:S}}],k={
4848
match:[/\b[a-zA-Z0-9\.]*Exception/,s,a],scope:{1:"type",3:"variable"},
49-
relevance:0},F={match:[/(?<!\.)/,c,/\s*(?=\=[^\>])/],scope:{2:"variable3"},
49+
relevance:0},F={match:[/(?<!\.)/,c,/\s*(?=\=[^\>])/],scope:{2:"variable"},
5050
relevance:0},P={match:[/(?<=\=\s*\()/,a,"(?=\\)\\s*"+a+")"],scope:{2:"type"},
5151
relevance:0},Y={match:[/\bnew\s+/,a,o],scope:{2:"type"},relevance:0};let W={
5252
scope:"params_call",begin:/\(/,beginScope:"punctuation",end:/\)/,
@@ -57,10 +57,10 @@ contains:[...i],starts:W},{match:[/^\s*/,l(...b),a,o],scope:{
5757
;W.contains=[C,Y,I,_,f,O,p,U,x,{keywords:{KEYWORDS:y},
5858
match:t.concat(/(?<=\s|\(|\,)/,l(...S),a,/\b/,/(?!\.)/),scope:"variable",
5959
relevance:0},{match:/\(|\,|\./,scope:"punctuation",relevance:0},{match:a,
60-
scope:"variable4"}];const H={scope:"params",end:/\)/,endScope:"punctuation",
60+
scope:"variable"}];const H={scope:"params",end:/\)/,endScope:"punctuation",
6161
relevance:1,keywords:y,contains:[p,C,I,f,...O,{match:/\,|\(/,scope:"punctuation"
6262
},U,{match:[/(?<=\(|\,)\s*/,a,/(?=\s)/],scope:{2:"type"}},{
63-
match:[s,a,/\s*(?=[,)])/],scope:{2:"variable5"}}]},G={
63+
match:[s,a,/\s*(?=[,)])/],scope:{2:"variable"}}]},G={
6464
match:[/\bswitch\s+on\s+/,a],scope:{1:"keyword",2:"variable"}};return{
6565
name:"Apex",aliases:["apex","lightning","soql"],case_insensitive:!0,
6666
disableAutodetect:!1,ignoreIllegals:!1,keywords:y,
@@ -99,9 +99,9 @@ scope:"keyword",relevance:8},{
9999
match:[/(NEXT|LAST)_N_(DAY|FISCAL_QUARTER|FISCAL_YEAR|MONTH|QUARTER|WEEK|YEAR)S/,/\s*:\s*/,/\d+/],
100100
scope:{1:"keyword",2:"operator",3:"number"},relevance:8},{
101101
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/),
102-
scope:"keyword"},{match:[/(?<=:)/,/\s*/,c,/(?!\()/],scope:{3:"variable6"},
102+
scope:"keyword"},{match:[/(?<=:)/,/\s*/,c,/(?!\()/],scope:{3:"variable"},
103103
relevance:0},{match:[/(?<=:|\.)/,a,/(?=\s*\()/],scope:{2:"title.function.invoke"
104104
},relevance:0},{match:/:/,scope:"operator",relevance:0}],illegal:"::"
105-
},G,F,_,w,i,{match:t.concat("(?<=this.\b)",a,"(?!\\()"),scope:"variable7"},{
105+
},G,F,_,w,i,{match:t.concat("(?<=this.\b)",a,"(?!\\()"),scope:"variable"},{
106106
match:[t.concat(/\b/,l(...L)),a,s,/(?=\{)/],scope:{2:"property"},relevance:0}]}}
107107
})();export default hljsGrammar;

dist/apex.min.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ $pattern:t.concat(/(?<!\.)\b/,a,/\b/),keyword:[...b,...d,...E],type:m,literal:S
1313
},L=[...S,...b,...d,...A,...h,...v,...u,...E],N={
1414
match:t.concat(/\b/,t.either(...u),/\b/),scope:"variable.language",relevance:0
1515
},O=[{match:[t.concat(/\b/,t.either(...v)),/\./,a,/\b\s*(?![\.\(])/],scope:{
16-
1:"built_in",2:"punctuation",3:"variable1"},relevance:0},{
16+
1:"built_in",2:"punctuation",3:"variable"},relevance:0},{
1717
match:[t.concat(/\b/,t.either(...h)),/\./,a,/\b\s*(?![\.\(])/],scope:{
1818
1:"built_in",2:"punctuation",3:"type"},relevance:0},{
1919
match:[t.concat(/\b/,t.either(...A)),/\./,c,/\b(?=\.)/],scope:{1:"built_in",
@@ -32,7 +32,7 @@ scope:"string",relevance:0,contains:[{match:/\\'/,scope:"literal",relevance:0}]
3232
relevance:0,contains:[{begin:/\w+@/,relevance:0},{
3333
match:[/@(?:exception|throws)/,s,a],scope:{1:"doctag",3:"title.class"},
3434
relevance:0},{begin:"@[A-Za-z_-]+",scope:"doctag",relevance:0},{
35-
match:[/(?<=@param)\s+/,a],scope:{2:"variable2"},relevance:0},{excludeBegin:!0,
35+
match:[/(?<=@param)\s+/,a],scope:{2:"variable"},relevance:0},{excludeBegin:!0,
3636
excludeEnd:!0,contains:[e.BACKSLASH_ESCAPE],relevance:0,variants:[{begin:"`",
3737
end:"`",scope:"subst"},{begin:/'/,end:/'/,scope:"string"}]}]}),D],_={
3838
match:t.either(...R),scope:"operator",relevance:0},U={match:/(?<!\.)\bId\b/,
@@ -46,7 +46,7 @@ match:[t.optional(c),/\[/,t.optional(/\d+/),/\]/],scope:{1:"variable",
4646
},end:/\)/,endScope:"punctuation",contains:[{match:[c,/\s*=/],scope:{
4747
1:"keyword",2:"operator"},contains:[_]},C,p],keywords:{literal:S}}],k={
4848
match:[/\b[a-zA-Z0-9\.]*Exception/,s,a],scope:{1:"type",3:"variable"},
49-
relevance:0},F={match:[/(?<!\.)/,c,/\s*(?=\=[^\>])/],scope:{2:"variable3"},
49+
relevance:0},F={match:[/(?<!\.)/,c,/\s*(?=\=[^\>])/],scope:{2:"variable"},
5050
relevance:0},P={match:[/(?<=\=\s*\()/,a,"(?=\\)\\s*"+a+")"],scope:{2:"type"},
5151
relevance:0},Y={match:[/\bnew\s+/,a,o],scope:{2:"type"},relevance:0};let W={
5252
scope:"params_call",begin:/\(/,beginScope:"punctuation",end:/\)/,
@@ -57,10 +57,10 @@ contains:[...r],starts:W},{match:[/^\s*/,l(...b),a,o],scope:{
5757
;W.contains=[C,Y,I,_,f,O,p,U,x,{keywords:{KEYWORDS:y},
5858
match:t.concat(/(?<=\s|\(|\,)/,l(...S),a,/\b/,/(?!\.)/),scope:"variable",
5959
relevance:0},{match:/\(|\,|\./,scope:"punctuation",relevance:0},{match:a,
60-
scope:"variable4"}];const H={scope:"params",end:/\)/,endScope:"punctuation",
60+
scope:"variable"}];const H={scope:"params",end:/\)/,endScope:"punctuation",
6161
relevance:1,keywords:y,contains:[p,C,I,f,...O,{match:/\,|\(/,scope:"punctuation"
6262
},U,{match:[/(?<=\(|\,)\s*/,a,/(?=\s)/],scope:{2:"type"}},{
63-
match:[s,a,/\s*(?=[,)])/],scope:{2:"variable5"}}]},B={
63+
match:[s,a,/\s*(?=[,)])/],scope:{2:"variable"}}]},B={
6464
match:[/\bswitch\s+on\s+/,a],scope:{1:"keyword",2:"variable"}};return{
6565
name:"Apex",aliases:["apex","lightning","soql"],case_insensitive:!0,
6666
disableAutodetect:!1,ignoreIllegals:!1,keywords:y,
@@ -99,9 +99,9 @@ scope:"keyword",relevance:8},{
9999
match:[/(NEXT|LAST)_N_(DAY|FISCAL_QUARTER|FISCAL_YEAR|MONTH|QUARTER|WEEK|YEAR)S/,/\s*:\s*/,/\d+/],
100100
scope:{1:"keyword",2:"operator",3:"number"},relevance:8},{
101101
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/),
102-
scope:"keyword"},{match:[/(?<=:)/,/\s*/,c,/(?!\()/],scope:{3:"variable6"},
102+
scope:"keyword"},{match:[/(?<=:)/,/\s*/,c,/(?!\()/],scope:{3:"variable"},
103103
relevance:0},{match:[/(?<=:|\.)/,a,/(?=\s*\()/],scope:{2:"title.function.invoke"
104104
},relevance:0},{match:/:/,scope:"operator",relevance:0}],illegal:"::"
105-
},B,F,_,w,r,{match:t.concat("(?<=this.\b)",a,"(?!\\()"),scope:"variable7"},{
105+
},B,F,_,w,r,{match:t.concat("(?<=this.\b)",a,"(?!\\()"),scope:"variable"},{
106106
match:[t.concat(/\b/,l(...L)),a,s,/(?=\{)/],scope:{2:"property"},relevance:0}]}}
107107
})();hljs.registerLanguage("apex",e)})();

src/languages/apex.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ export default function (hljs) {
336336
/\b\s*(?![\.\(])/
337337
],
338338
// TODO: Find a better scope for the enum value
339-
scope: { 1: 'built_in', 2: 'punctuation', 3: 'variable1' },
339+
scope: { 1: 'built_in', 2: 'punctuation', 3: 'variable' },
340340
relevance: 0
341341
},
342342
{
@@ -437,7 +437,7 @@ export default function (hljs) {
437437
},
438438
{
439439
match: [/(?<=@param)\s+/, APEX_IDENT_RE],
440-
scope: { 2: 'variable2' },
440+
scope: { 2: 'variable' },
441441
relevance: 0
442442
},
443443
{
@@ -554,7 +554,7 @@ export default function (hljs) {
554554
// mynum =
555555
// could also be a collection variable
556556
match: [/(?<!\.)/, APEX_IDENT_WORD_RE, /\s*(?=\=[^\>])/],
557-
scope: { 2: 'variable3' },
557+
scope: { 2: 'variable' },
558558
relevance: 0
559559
};
560560
const CASTING = {
@@ -628,7 +628,7 @@ export default function (hljs) {
628628
relevance: 0
629629
},
630630
{ match: /\(|\,|\./, scope: 'punctuation', relevance: 0 },
631-
{ match: APEX_IDENT_RE, scope: 'variable4' }
631+
{ match: APEX_IDENT_RE, scope: 'variable' }
632632
];
633633

634634
const PARAMS_DECLARATION = {
@@ -655,7 +655,7 @@ export default function (hljs) {
655655
// must be followed by comma or paren
656656
match: [SPACE, APEX_IDENT_RE, /\s*(?=[,)])/],
657657

658-
scope: { 2: 'variable5' }
658+
scope: { 2: 'variable' }
659659
}
660660
]
661661
};
@@ -1007,7 +1007,7 @@ export default function (hljs) {
10071007
{
10081008
// colon notation
10091009
match: [/(?<=:)/, /\s*/, APEX_IDENT_WORD_RE, /(?!\()/],
1010-
scope: { 3: 'variable6' },
1010+
scope: { 3: 'variable' },
10111011
relevance: 0
10121012
},
10131013
{
@@ -1041,7 +1041,7 @@ export default function (hljs) {
10411041

10421042
const THIS = {
10431043
match: regex.concat('(?<=this\.\b)', APEX_IDENT_RE, '(?!\\()'),
1044-
scope: 'variable7'
1044+
scope: 'variable'
10451045
};
10461046

10471047
const PROPERTY = {

0 commit comments

Comments
 (0)