1 |
- {"ast":null,"code":"/*\nLanguage: Visual Basic .NET\nDescription: Visual Basic .NET (VB.NET) is a multi-paradigm, object-oriented programming language, implemented on the .NET Framework.\nAuthors: Poren Chiang <ren.chiang@gmail.com>, Jan Pilzer\nWebsite: https://docs.microsoft.com/dotnet/visual-basic/getting-started\nCategory: common\n*/\n\n/** @type LanguageFn */\nfunction vbnet(hljs) {\n const regex = hljs.regex;\n /**\n * Character Literal\n * Either a single character (\"a\"C) or an escaped double quote (\"\"\"\"C).\n */\n const CHARACTER = {\n className: 'string',\n begin: /\"(\"\"|[^/n])\"C\\b/\n };\n const STRING = {\n className: 'string',\n begin: /\"/,\n end: /\"/,\n illegal: /\\n/,\n contains: [{\n // double quote escape\n begin: /\"\"/\n }]\n };\n\n /** Date Literals consist of a date, a time, or both separated by whitespace, surrounded by # */\n const MM_DD_YYYY = /\\d{1,2}\\/\\d{1,2}\\/\\d{4}/;\n const YYYY_MM_DD = /\\d{4}-\\d{1,2}-\\d{1,2}/;\n const TIME_12H = /(\\d|1[012])(:\\d+){0,2} *(AM|PM)/;\n const TIME_24H = /\\d{1,2}(:\\d{1,2}){1,2}/;\n const DATE = {\n className: 'literal',\n variants: [{\n // #YYYY-MM-DD# (ISO-Date) or #M/D/YYYY# (US-Date)\n begin: regex.concat(/# */, regex.either(YYYY_MM_DD, MM_DD_YYYY), / *#/)\n }, {\n // #H:mm[:ss]# (24h Time)\n begin: regex.concat(/# */, TIME_24H, / *#/)\n }, {\n // #h[:mm[:ss]] A# (12h Time)\n begin: regex.concat(/# */, TIME_12H, / *#/)\n }, {\n // date plus time\n begin: regex.concat(/# */, regex.either(YYYY_MM_DD, MM_DD_YYYY), / +/, regex.either(TIME_12H, TIME_24H), / *#/)\n }]\n };\n const NUMBER = {\n className: 'number',\n relevance: 0,\n variants: [{\n // Float\n begin: /\\b\\d[\\d_]*((\\.[\\d_]+(E[+-]?[\\d_]+)?)|(E[+-]?[\\d_]+))[RFD@!#]?/\n }, {\n // Integer (base 10)\n begin: /\\b\\d[\\d_]*((U?[SIL])|[%&])?/\n }, {\n // Integer (base 16)\n begin: /&H[\\dA-F_]+((U?[SIL])|[%&])?/\n }, {\n // Integer (base 8)\n begin: /&O[0-7_]+((U?[SIL])|[%&])?/\n }, {\n // Integer (base 2)\n begin: /&B[01_]+((U?[SIL])|[%&])?/\n }]\n };\n const LABEL = {\n className: 'label',\n begin: /^\\w+:/\n };\n const DOC_COMMENT = hljs.COMMENT(/'''/, /$/, {\n contains: [{\n className: 'doctag',\n begin: /<\\/?/,\n end: />/\n }]\n });\n const COMMENT = hljs.COMMENT(null, /$/, {\n variants: [{\n begin: /'/\n }, {\n // TODO: Use multi-class for leading spaces\n begin: /([\\t ]|^)REM(?=\\s)/\n }]\n });\n const DIRECTIVES = {\n className: 'meta',\n // TODO: Use multi-class for indentation once available\n begin: /[\\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\\b/,\n end: /$/,\n keywords: {\n keyword: 'const disable else elseif enable end externalsource if region then'\n },\n contains: [COMMENT]\n };\n return {\n name: 'Visual Basic .NET',\n aliases: ['vb'],\n case_insensitive: true,\n classNameAliases: {\n label: 'symbol'\n },\n keywords: {\n keyword: 'addhandler alias aggregate ansi as async assembly auto binary by byref byval ' /* a-b */ + 'call case catch class compare const continue custom declare default delegate dim distinct do ' /* c-d */ + 'each equals else elseif end enum erase error event exit explicit finally for friend from function ' /* e-f */ + 'get global goto group handles if implements imports in inherits interface into iterator ' /* g-i */ + 'join key let lib loop me mid module mustinherit mustoverride mybase myclass ' /* j-m */ + 'namespace narrowing new next notinheritable notoverridable ' /* n */ + 'of off on operator option optional order overloads overridable overrides ' /* o */ + 'paramarray partial preserve private property protected public ' /* p */ + 'raiseevent readonly redim removehandler resume return ' /* r */ + 'select set shadows shared skip static step stop structure strict sub synclock ' /* s */ + 'take text then throw to try unicode until using when where while widening with withevents writeonly yield' /* t-y */,\n built_in:\n // Operators https://docs.microsoft.com/dotnet/visual-basic/language-reference/operators\n 'addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor '\n // Type Conversion Functions https://docs.microsoft.com/dotnet/visual-basic/language-reference/functions/type-conversion-functions\n + 'cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort',\n type:\n // Data types https://docs.microsoft.com/dotnet/visual-basic/language-reference/data-types\n 'boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort',\n literal: 'true false nothing'\n },\n illegal: '//|\\\\{|\\\\}|endif|gosub|variant|wend|^\\\\$ ' /* reserved deprecated keywords */,\n contains: [CHARACTER, STRING, DATE, NUMBER, LABEL, DOC_COMMENT, COMMENT, DIRECTIVES]\n };\n}\nmodule.exports = vbnet;","map":{"version":3,"names":["vbnet","hljs","regex","CHARACTER","className","begin","STRING","end","illegal","contains","MM_DD_YYYY","YYYY_MM_DD","TIME_12H","TIME_24H","DATE","variants","concat","either","NUMBER","relevance","LABEL","DOC_COMMENT","COMMENT","DIRECTIVES","keywords","keyword","name","aliases","case_insensitive","classNameAliases","label","built_in","type","literal","module","exports"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/highlight.js/lib/languages/vbnet.js"],"sourcesContent":["/*\nLanguage: Visual Basic .NET\nDescription: Visual Basic .NET (VB.NET) is a multi-paradigm, object-oriented programming language, implemented on the .NET Framework.\nAuthors: Poren Chiang <ren.chiang@gmail.com>, Jan Pilzer\nWebsite: https://docs.microsoft.com/dotnet/visual-basic/getting-started\nCategory: common\n*/\n\n/** @type LanguageFn */\nfunction vbnet(hljs) {\n const regex = hljs.regex;\n /**\n * Character Literal\n * Either a single character (\"a\"C) or an escaped double quote (\"\"\"\"C).\n */\n const CHARACTER = {\n className: 'string',\n begin: /\"(\"\"|[^/n])\"C\\b/\n };\n\n const STRING = {\n className: 'string',\n begin: /\"/,\n end: /\"/,\n illegal: /\\n/,\n contains: [\n {\n // double quote escape\n begin: /\"\"/ }\n ]\n };\n\n /** Date Literals consist of a date, a time, or both separated by whitespace, surrounded by # */\n const MM_DD_YYYY = /\\d{1,2}\\/\\d{1,2}\\/\\d{4}/;\n const YYYY_MM_DD = /\\d{4}-\\d{1,2}-\\d{1,2}/;\n const TIME_12H = /(\\d|1[012])(:\\d+){0,2} *(AM|PM)/;\n const TIME_24H = /\\d{1,2}(:\\d{1,2}){1,2}/;\n const DATE = {\n className: 'literal',\n variants: [\n {\n // #YYYY-MM-DD# (ISO-Date) or #M/D/YYYY# (US-Date)\n begin: regex.concat(/# */, regex.either(YYYY_MM_DD, MM_DD_YYYY), / *#/) },\n {\n // #H:mm[:ss]# (24h Time)\n begin: regex.concat(/# */, TIME_24H, / *#/) },\n {\n // #h[:mm[:ss]] A# (12h Time)\n begin: regex.concat(/# */, TIME_12H, / *#/) },\n {\n // date plus time\n begin: regex.concat(\n /# */,\n regex.either(YYYY_MM_DD, MM_DD_YYYY),\n / +/,\n regex.either(TIME_12H, TIME_24H),\n / *#/\n ) }\n ]\n };\n\n const NUMBER = {\n className: 'number',\n relevance: 0,\n variants: [\n {\n // Float\n begin: /\\b\\d[\\d_]*((\\.[\\d_]+(E[+-]?[\\d_]+)?)|(E[+-]?[\\d_]+))[RFD@!#]?/ },\n {\n // Integer (base 10)\n begin: /\\b\\d[\\d_]*((U?[SIL])|[%&])?/ },\n {\n // Integer (base 16)\n begin: /&H[\\dA-F_]+((U?[SIL])|[%&])?/ },\n {\n // Integer (base 8)\n begin: /&O[0-7_]+((U?[SIL])|[%&])?/ },\n {\n // Integer (base 2)\n begin: /&B[01_]+((U?[SIL])|[%&])?/ }\n ]\n };\n\n const LABEL = {\n className: 'label',\n begin: /^\\w+:/\n };\n\n const DOC_COMMENT = hljs.COMMENT(/'''/, /$/, { contains: [\n {\n className: 'doctag',\n begin: /<\\/?/,\n end: />/\n }\n ] });\n\n const COMMENT = hljs.COMMENT(null, /$/, { variants: [\n { begin: /'/ },\n {\n // TODO: Use multi-class for leading spaces\n begin: /([\\t ]|^)REM(?=\\s)/ }\n ] });\n\n const DIRECTIVES = {\n className: 'meta',\n // TODO: Use multi-class for indentation once available\n begin: /[\\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\\b/,\n end: /$/,\n keywords: { keyword:\n 'const disable else elseif enable end externalsource if region then' },\n contains: [ COMMENT ]\n };\n\n return {\n name: 'Visual Basic .NET',\n aliases: [ 'vb' ],\n case_insensitive: true,\n classNameAliases: { label: 'symbol' },\n keywords: {\n keyword:\n 'addhandler alias aggregate ansi as async assembly auto binary by byref byval ' /* a-b */\n + 'call case catch class compare const continue custom declare default delegate dim distinct do ' /* c-d */\n + 'each equals else elseif end enum erase error event exit explicit finally for friend from function ' /* e-f */\n + 'get global goto group handles if implements imports in inherits interface into iterator ' /* g-i */\n + 'join key let lib loop me mid module mustinherit mustoverride mybase myclass ' /* j-m */\n + 'namespace narrowing new next notinheritable notoverridable ' /* n */\n + 'of off on operator option optional order overloads overridable overrides ' /* o */\n + 'paramarray partial preserve private property protected public ' /* p */\n + 'raiseevent readonly redim removehandler resume return ' /* r */\n + 'select set shadows shared skip static step stop structure strict sub synclock ' /* s */\n + 'take text then throw to try unicode until using when where while widening with withevents writeonly yield' /* t-y */,\n built_in:\n // Operators https://docs.microsoft.com/dotnet/visual-basic/language-reference/operators\n 'addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor '\n // Type Conversion Functions https://docs.microsoft.com/dotnet/visual-basic/language-reference/functions/type-conversion-functions\n + 'cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort',\n type:\n // Data types https://docs.microsoft.com/dotnet/visual-basic/language-reference/data-types\n 'boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort',\n literal: 'true false nothing'\n },\n illegal:\n '//|\\\\{|\\\\}|endif|gosub|variant|wend|^\\\\$ ' /* reserved deprecated keywords */,\n contains: [\n CHARACTER,\n STRING,\n DATE,\n NUMBER,\n LABEL,\n DOC_COMMENT,\n COMMENT,\n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