diff --git a/dist/apex.es.min.js b/dist/apex.es.min.js index 62ab9e9..67bba78 100644 --- a/dist/apex.es.min.js +++ b/dist/apex.es.min.js @@ -1,115 +1,115 @@ /*! `apex` grammar compiled for Highlight.js 11.11.1 */ var hljsGrammar=(()=>{"use strict";return e=>{ -const t=e.regex,n="[a-zA-Z][a-zA-Z_0-9]*",a="\\b"+n+"\\b",c="@"+n,s=/(?=\s*\()/,o=/\s+/,i=/(?>\=|>>>\=|\|\=/,/\&|~|\^|\|/,/<<|>>/,/<\=|>\=|\s(<|>)\s/,/\=\=|!\=/,/\=>/,/!(?=\w)/,/(?<=\s)(\?|:)(?=\s)/,r,/(?<=\s)(\?\?)(?=\s)/,/(?)/],L=v.concat(...S),O={ -$pattern:t.concat(/(?>\=|>>>\=|\|\=/,/\&|~|\^|\|/,/<<|>>/,/<\=|>\=|\s(<|>)\s/,/\=\=|!\=/,/\=>/,/!(?=\w)/,/(?<=\s)(\?|:)(?=\s)/,u,/(?<=\s)(\?\?)(?=\s)/,/(?)/],C=T.concat(...y),D={ +$pattern:t.concat(/(?/,/\<(?=\w)/,/\{|\}/,/\(|\)/,/\{|\}/), -scope:"punctuation",relevance:0},T],I=e.inherit(e.APOS_STRING_MODE,{ +scope:"punctuation",relevance:0},N],k=e.inherit(e.APOS_STRING_MODE,{ scope:"string",relevance:1,contains:[{match:/\\'/,scope:"literal",relevance:1}] -}),_=[{begin:"`",end:"`",scope:"string"},{begin:/'/,end:/'/,scope:"string"},{ -begin:/"/,end:/"/,scope:"string"}],f=e.COMMENT("//",/[$\n]/,{relevance:0 -}),U=[e.COMMENT("/\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0 -},{match:[/@(?:exception|throws)/,o,t.concat(n,i,n)],scope:{1:"doctag", +}),M=[{begin:"`",end:"`",scope:"string"},{begin:/'/,end:/'/,scope:"string"},{ +begin:/"/,end:/"/,scope:"string"}],F=e.COMMENT("//",/[$\n]/,{relevance:0 +}),P=[e.COMMENT("/\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0 +},{match:[/@(?:exception|throws)/,o,t.concat(n,b,n)],scope:{1:"doctag", 3:"title.class"},relevance:0},{match:[/@(?:exception|throws)/,o,n],scope:{ 1:"doctag",3:"title.class"},relevance:0},{ -begin:[/\{/,/@(?:link|see)/,o,/[a-zA-Z_0-9]*/,t.concat(/(?:#|\.)/,n),s], -beginScope:{2:"doctag",4:"title.class",5:"title.method"},end:/\}/,contains:[{ +begin:[i,/@(?:link|see)/,o,/[a-zA-Z_0-9]*/,t.concat(/(?:#|\.)/,n),s], +beginScope:{2:"doctag",4:"title.class",5:"title.method"},end:r,contains:[{ match:/(?:\(|\))/,scope:"punctuation"},{match:[o,n,/\s*(?=[,)])/],scope:{ 2:"variable"}},{match:[n,/(?=\s)/],scope:{1:"type"}}]},{ -begin:[/\{/,/@(?:link|see)/,o,/[a-zA-Z_0-9]*/,t.concat(/(?:#|\.)/,n,/\s*(?=\})/)], -beginScope:{2:"doctag",4:"title.class",5:"title.method"},end:/\}/,returnEnd:!0 -},{begin:[/\{/,/@(?:link|see)/,o,a],beginScope:{2:"doctag",4:"title.class"}, -end:/\}/,returnEnd:!0},{begin:[/\{/,/@(?:link|see)(?=\s+")/],beginScope:{ -2:"doctag"},end:/\}/,returnEnd:!0,contains:_},{begin:[/\{/,/@(?:link|see)/], -beginScope:{2:"doctag"},end:/\}/,returnEnd:!0,subLanguage:["markdown","xml"]},{ -begin:[/\{/,/@literal/],beginScope:{2:"doctag"},end:/\}/,returnEnd:!0, +begin:[i,/@(?:link|see)/,o,/[a-zA-Z_0-9]*/,t.concat(/(?:#|\.)/,n,/\s*(?=\})/)], +beginScope:{2:"doctag",4:"title.class",5:"title.method"},end:r,returnEnd:!0},{ +begin:[i,/@(?:link|see)/,o,a],beginScope:{2:"doctag",4:"title.class"},end:r, +returnEnd:!0},{begin:[i,/@(?:link|see)(?=\s+")/],beginScope:{2:"doctag"},end:r, +returnEnd:!0,contains:M},{begin:[i,/@(?:link|see)/],beginScope:{2:"doctag"}, +end:r,returnEnd:!0,subLanguage:["markdown","xml"]},{begin:[i,/@literal/], +beginScope:{2:"doctag"},end:r,returnEnd:!0, subLanguage:["apex","xml","javascript"]},{match:c,scope:"doctag",relevance:0},{ match:[/(?<=@param)\s+/,n],scope:{2:"variable"},relevance:0},{ -contains:[e.BACKSLASH_ESCAPE],relevance:0,variants:_},{begin:/[0-9]+\.[0-9]+/, +contains:[e.BACKSLASH_ESCAPE],relevance:0,variants:M},{begin:/[0-9]+\.[0-9]+/, end:/\.*\s+/,scope:"number",excludeEnd:!0},{ begin:t.either(/\d{4}-\d{1,2}-\d{1,2}/,/\d{1,2}\/\d{1,2}\/\d{4}/), -scope:"literal"},{begin:[/\{/,/@code/],beginScope:{2:"doctag"},starts:{end:/\}/, -returnEnd:!0,contains:[{match:/^\s+\*\s+/,skip:!0,relevance:0},{begin:/\{/, -end:/\}/,skip:!0}],subLanguage:["apex","xml","javascript"]}}]}),f],k={ -match:t.either(...y),scope:"operator",relevance:0},M=[{ +scope:"literal"},{begin:[i,/@code/],beginScope:{2:"doctag"},starts:{end:r, +returnEnd:!0,contains:[{match:/^\s+\*\s+/,skip:!0,relevance:0},{begin:i,end:r, +skip:!0}],subLanguage:["apex","xml","javascript"]}}]}),F],Y={ +match:t.either(...w),scope:"operator",relevance:0},x=[{ begin:/\b(list|set|map)(?=\s*<)/,beginScope:"type",end:/\>+/, endScope:"punctuation",contains:[{match:/\<|\,/,scope:"punctuation"},{match:a, scope:"type"}],relevance:8},{match:[t.optional(a),/\[/,t.optional(/\d+/),/\]/], scope:{1:"variable",2:"punctuation",3:"number",4:"punctuation"}},{ -match:[n,/\[\]/],scope:{1:"type",2:"punctuation"},relevance:0}],F=[{ +match:[n,/\[\]/],scope:{1:"type",2:"punctuation"},relevance:0}],W=[{ match:t.concat(c,/\b(?!\s*\()/),scope:"meta"},{scope:"meta", -begin:[t.concat(c,/\b/),/\s*/,/\(/],beginScope:{3:"punctuation"},end:/\)/, +begin:[t.concat(c,/\b/),/\s*/,l],beginScope:{3:"punctuation"},end:p, endScope:"punctuation",contains:[{match:[a,/\s*=/],scope:{1:"keyword", -2:"operator"},contains:[k]},I,u],keywords:{literal:R}}],P={ +2:"operator"},contains:[Y]},k,g],keywords:{literal:O}}],H={ match:[/\b[a-zA-Z0-9\.]*Exception/,o,n],scope:{1:"type",3:"variable"}, -relevance:0},Y=[{match:[/(?])/],scope:{2:"variable"}, +relevance:0},G=[{match:[/(?])/],scope:{2:"variable"}, relevance:0},{match:[a,"(?=\\s+"+n+/\s*\=/+")"],scope:{1:"type"},relevance:0},{ -match:[a,o,a,/\s*(?=\=[^\>])/],scope:{1:"type",3:"variable"},relevance:0}],x={ -match:[/(?<=\=\s*\()/,n,"(?=\\)\\s*"+n+")"],scope:{2:"type"},relevance:0},W={ -match:[/\bnew\s+/,n,s],scope:{2:"type"},relevance:0};let H={begin:/\(/, -beginScope:"punctuation",end:/\)/,endScope:"punctuation",relevance:0,keywords:O, -contains:[]};const G=[{match:[/(?<=\.)/,n,s],scope:{2:"title.function.invoke1"}, -relevance:1,contains:[...l],starts:H},{match:[/^\s*/,b(...d),n,s],scope:{ -3:"title.function.invoke"},relevance:1,starts:H}] -;H.contains=[I,W,U,k,M,w,u,p,G,{keywords:{KEYWORDS:O}, -match:t.concat(/(?<=\s|\(|\,)/,b(...R),n,/\b/,/(?!\.)/),scope:"variable", +match:[a,o,a,/\s*(?=\=[^\>])/],scope:{1:"type",3:"variable"},relevance:0}],B={ +match:[/(?<=\=\s*\()/,n,"(?=\\)\\s*"+n+")"],scope:{2:"type"},relevance:0},K={ +match:[/\bnew\s+/,n,s],scope:{2:"type"},relevance:0};let Q={begin:l, +beginScope:"punctuation",end:p,endScope:"punctuation",relevance:0,keywords:D, +contains:[]};const V=[{match:[/(?<=\.)/,n,s],scope:{2:"title.function.invoke1"}, +relevance:1,contains:[...d],starts:Q},{match:[/^\s*/,E(...h),n,s],scope:{ +3:"title.function.invoke"},relevance:1,starts:Q}] +;Q.contains=[k,K,P,Y,x,f,g,m,V,{keywords:{KEYWORDS:D}, +match:t.concat(/(?<=\s|\(|\,)/,E(...O),n,/\b/,/(?!\.)/),scope:"variable", relevance:0},{match:/\(|\,|\./,scope:"punctuation",relevance:0},{match:n, -scope:"variable"}];const B={scope:"params",end:/\)/,endScope:"punctuation", -relevance:1,keywords:O,contains:[u,I,U,M,...w,{match:/\,|\(/,scope:"punctuation" -},p,{match:[/(?<=\(|\,)\s*/,n,/(?=\s)/],scope:{2:"type"}},{ -match:[o,n,/\s*(?=[,)])/],scope:{2:"variable"}}]},Q={ +scope:"variable"}];const z={scope:"params",end:p,endScope:"punctuation", +relevance:1,keywords:D,contains:[g,k,P,x,...f,{match:/\,|\(/,scope:"punctuation" +},m,{match:[/(?<=\(|\,)\s*/,n,/(?=\s)/],scope:{2:"type"}},{ +match:[o,n,/\s*(?=[,)])/],scope:{2:"variable"}}]},Z={ match:[/\bswitch\s+on\s+/,n],scope:{1:"keyword",2:"variable"}};return{ name:"Apex",aliases:["apex","lightning","soql","sosl"],case_insensitive:!0, -disableAutodetect:!1,ignoreIllegals:!1,keywords:O, +disableAutodetect:!1,ignoreIllegals:!1,keywords:D,beginKeywords:"Id", illegal:["","<#","<]","