123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434 |
- /*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Version: 0.31.1(337587859b1c171314b40503171188b6cea6a32a)
- * Released under the MIT license
- * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
- *-----------------------------------------------------------------------------*/
- define("vs/basic-languages/javascript/javascript",[],()=>{
- var moduleExports = (() => {
- var __create = Object.create;
- var __defProp = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames = Object.getOwnPropertyNames;
- var __getProtoOf = Object.getPrototypeOf;
- var __hasOwnProp = Object.prototype.hasOwnProperty;
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
- var __commonJS = (cb, mod) => function __require() {
- return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
- };
- var __export = (target, all) => {
- __markAsModule(target);
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
- };
- var __reExport = (target, module, desc) => {
- if (module && typeof module === "object" || typeof module === "function") {
- for (let key of __getOwnPropNames(module))
- if (!__hasOwnProp.call(target, key) && key !== "default")
- __defProp(target, key, { get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable });
- }
- return target;
- };
- var __toModule = (module) => {
- return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? { get: () => module.default, enumerable: true } : { value: module, enumerable: true })), module);
- };
- // build/fillers/monaco-editor-core-amd.ts
- var require_monaco_editor_core_amd = __commonJS({
- "build/fillers/monaco-editor-core-amd.ts"(exports, module) {
- module.exports = self.monaco;
- }
- });
- // src/basic-languages/javascript/javascript.ts
- var javascript_exports = {};
- __export(javascript_exports, {
- conf: () => conf2,
- language: () => language2
- });
- // src/fillers/monaco-editor-core.ts
- var monaco_editor_core_exports = {};
- __markAsModule(monaco_editor_core_exports);
- __reExport(monaco_editor_core_exports, __toModule(require_monaco_editor_core_amd()));
- // src/basic-languages/typescript/typescript.ts
- var conf = {
- wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
- comments: {
- lineComment: "//",
- blockComment: ["/*", "*/"]
- },
- brackets: [
- ["{", "}"],
- ["[", "]"],
- ["(", ")"]
- ],
- onEnterRules: [
- {
- beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
- afterText: /^\s*\*\/$/,
- action: {
- indentAction: monaco_editor_core_exports.languages.IndentAction.IndentOutdent,
- appendText: " * "
- }
- },
- {
- beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
- action: {
- indentAction: monaco_editor_core_exports.languages.IndentAction.None,
- appendText: " * "
- }
- },
- {
- beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,
- action: {
- indentAction: monaco_editor_core_exports.languages.IndentAction.None,
- appendText: "* "
- }
- },
- {
- beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
- action: {
- indentAction: monaco_editor_core_exports.languages.IndentAction.None,
- removeText: 1
- }
- }
- ],
- autoClosingPairs: [
- { open: "{", close: "}" },
- { open: "[", close: "]" },
- { open: "(", close: ")" },
- { open: '"', close: '"', notIn: ["string"] },
- { open: "'", close: "'", notIn: ["string", "comment"] },
- { open: "`", close: "`", notIn: ["string", "comment"] },
- { open: "/**", close: " */", notIn: ["string"] }
- ],
- folding: {
- markers: {
- start: new RegExp("^\\s*//\\s*#?region\\b"),
- end: new RegExp("^\\s*//\\s*#?endregion\\b")
- }
- }
- };
- var language = {
- defaultToken: "invalid",
- tokenPostfix: ".ts",
- keywords: [
- "abstract",
- "any",
- "as",
- "asserts",
- "bigint",
- "boolean",
- "break",
- "case",
- "catch",
- "class",
- "continue",
- "const",
- "constructor",
- "debugger",
- "declare",
- "default",
- "delete",
- "do",
- "else",
- "enum",
- "export",
- "extends",
- "false",
- "finally",
- "for",
- "from",
- "function",
- "get",
- "if",
- "implements",
- "import",
- "in",
- "infer",
- "instanceof",
- "interface",
- "is",
- "keyof",
- "let",
- "module",
- "namespace",
- "never",
- "new",
- "null",
- "number",
- "object",
- "package",
- "private",
- "protected",
- "public",
- "override",
- "readonly",
- "require",
- "global",
- "return",
- "set",
- "static",
- "string",
- "super",
- "switch",
- "symbol",
- "this",
- "throw",
- "true",
- "try",
- "type",
- "typeof",
- "undefined",
- "unique",
- "unknown",
- "var",
- "void",
- "while",
- "with",
- "yield",
- "async",
- "await",
- "of"
- ],
- operators: [
- "<=",
- ">=",
- "==",
- "!=",
- "===",
- "!==",
- "=>",
- "+",
- "-",
- "**",
- "*",
- "/",
- "%",
- "++",
- "--",
- "<<",
- "</",
- ">>",
- ">>>",
- "&",
- "|",
- "^",
- "!",
- "~",
- "&&",
- "||",
- "??",
- "?",
- ":",
- "=",
- "+=",
- "-=",
- "*=",
- "**=",
- "/=",
- "%=",
- "<<=",
- ">>=",
- ">>>=",
- "&=",
- "|=",
- "^=",
- "@"
- ],
- symbols: /[=><!~?:&|+\-*\/\^%]+/,
- escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
- digits: /\d+(_+\d+)*/,
- octaldigits: /[0-7]+(_+[0-7]+)*/,
- binarydigits: /[0-1]+(_+[0-1]+)*/,
- hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
- regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
- regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
- tokenizer: {
- root: [[/[{}]/, "delimiter.bracket"], { include: "common" }],
- common: [
- [
- /[a-z_$][\w$]*/,
- {
- cases: {
- "@keywords": "keyword",
- "@default": "identifier"
- }
- }
- ],
- [/[A-Z][\w\$]*/, "type.identifier"],
- { include: "@whitespace" },
- [
- /\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,
- { token: "regexp", bracket: "@open", next: "@regexp" }
- ],
- [/[()\[\]]/, "@brackets"],
- [/[<>](?!@symbols)/, "@brackets"],
- [/!(?=([^=]|$))/, "delimiter"],
- [
- /@symbols/,
- {
- cases: {
- "@operators": "delimiter",
- "@default": ""
- }
- }
- ],
- [/(@digits)[eE]([\-+]?(@digits))?/, "number.float"],
- [/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, "number.float"],
- [/0[xX](@hexdigits)n?/, "number.hex"],
- [/0[oO]?(@octaldigits)n?/, "number.octal"],
- [/0[bB](@binarydigits)n?/, "number.binary"],
- [/(@digits)n?/, "number"],
- [/[;,.]/, "delimiter"],
- [/"([^"\\]|\\.)*$/, "string.invalid"],
- [/'([^'\\]|\\.)*$/, "string.invalid"],
- [/"/, "string", "@string_double"],
- [/'/, "string", "@string_single"],
- [/`/, "string", "@string_backtick"]
- ],
- whitespace: [
- [/[ \t\r\n]+/, ""],
- [/\/\*\*(?!\/)/, "comment.doc", "@jsdoc"],
- [/\/\*/, "comment", "@comment"],
- [/\/\/.*$/, "comment"]
- ],
- comment: [
- [/[^\/*]+/, "comment"],
- [/\*\//, "comment", "@pop"],
- [/[\/*]/, "comment"]
- ],
- jsdoc: [
- [/[^\/*]+/, "comment.doc"],
- [/\*\//, "comment.doc", "@pop"],
- [/[\/*]/, "comment.doc"]
- ],
- regexp: [
- [
- /(\{)(\d+(?:,\d*)?)(\})/,
- ["regexp.escape.control", "regexp.escape.control", "regexp.escape.control"]
- ],
- [
- /(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,
- ["regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }]
- ],
- [/(\()(\?:|\?=|\?!)/, ["regexp.escape.control", "regexp.escape.control"]],
- [/[()]/, "regexp.escape.control"],
- [/@regexpctl/, "regexp.escape.control"],
- [/[^\\\/]/, "regexp"],
- [/@regexpesc/, "regexp.escape"],
- [/\\\./, "regexp.invalid"],
- [/(\/)([dgimsuy]*)/, [{ token: "regexp", bracket: "@close", next: "@pop" }, "keyword.other"]]
- ],
- regexrange: [
- [/-/, "regexp.escape.control"],
- [/\^/, "regexp.invalid"],
- [/@regexpesc/, "regexp.escape"],
- [/[^\]]/, "regexp"],
- [
- /\]/,
- {
- token: "regexp.escape.control",
- next: "@pop",
- bracket: "@close"
- }
- ]
- ],
- string_double: [
- [/[^\\"]+/, "string"],
- [/@escapes/, "string.escape"],
- [/\\./, "string.escape.invalid"],
- [/"/, "string", "@pop"]
- ],
- string_single: [
- [/[^\\']+/, "string"],
- [/@escapes/, "string.escape"],
- [/\\./, "string.escape.invalid"],
- [/'/, "string", "@pop"]
- ],
- string_backtick: [
- [/\$\{/, { token: "delimiter.bracket", next: "@bracketCounting" }],
- [/[^\\`$]+/, "string"],
- [/@escapes/, "string.escape"],
- [/\\./, "string.escape.invalid"],
- [/`/, "string", "@pop"]
- ],
- bracketCounting: [
- [/\{/, "delimiter.bracket", "@bracketCounting"],
- [/\}/, "delimiter.bracket", "@pop"],
- { include: "common" }
- ]
- }
- };
- // src/basic-languages/javascript/javascript.ts
- var conf2 = conf;
- var language2 = {
- defaultToken: "invalid",
- tokenPostfix: ".js",
- keywords: [
- "break",
- "case",
- "catch",
- "class",
- "continue",
- "const",
- "constructor",
- "debugger",
- "default",
- "delete",
- "do",
- "else",
- "export",
- "extends",
- "false",
- "finally",
- "for",
- "from",
- "function",
- "get",
- "if",
- "import",
- "in",
- "instanceof",
- "let",
- "new",
- "null",
- "return",
- "set",
- "super",
- "switch",
- "symbol",
- "this",
- "throw",
- "true",
- "try",
- "typeof",
- "undefined",
- "var",
- "void",
- "while",
- "with",
- "yield",
- "async",
- "await",
- "of"
- ],
- typeKeywords: [],
- operators: language.operators,
- symbols: language.symbols,
- escapes: language.escapes,
- digits: language.digits,
- octaldigits: language.octaldigits,
- binarydigits: language.binarydigits,
- hexdigits: language.hexdigits,
- regexpctl: language.regexpctl,
- regexpesc: language.regexpesc,
- tokenizer: language.tokenizer
- };
- return javascript_exports;
- })();
- return moduleExports;
- });
|