UNPKG

yanzi-monaco-editorbb

Version:

这是一个基于微软的monaco和vue封装的一个代码编辑器,浏览器可运行。主要功能有:html、javascript、css代码编辑,高亮显示,语法错误提示等,可以帮您的项目很快的拥有一个web端的代码编辑器

241 lines (229 loc) 6.66 kB
((typeof self !== 'undefined' ? self : this)["webpackJsonpyanziMonacoEditor"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpyanziMonacoEditor"] || []).push([[10],{ /***/ "0867": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; }); /* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("4d63"); /* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var core_js_modules_es_regexp_dot_all_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("c607"); /* harmony import */ var core_js_modules_es_regexp_dot_all_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_dot_all_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ac1f"); /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("2c3e"); /* harmony import */ var core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("25f0"); /* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_4__); /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ // src/basic-languages/bicep/bicep.ts var bounded = function bounded(text) { return "\\b".concat(text, "\\b"); }; var identifierStart = "[_a-zA-Z]"; var identifierContinue = "[_a-zA-Z0-9]"; var identifier = bounded("".concat(identifierStart).concat(identifierContinue, "*")); var keywords = ["targetScope", "resource", "module", "param", "var", "output", "for", "in", "if", "existing"]; var namedLiterals = ["true", "false", "null"]; var nonCommentWs = "[ \\t\\r\\n]"; var numericLiteral = "[0-9]+"; var conf = { comments: { lineComment: "//", blockComment: ["/*", "*/"] }, brackets: [["{", "}"], ["[", "]"], ["(", ")"]], surroundingPairs: [{ open: "{", close: "}" }, { open: "[", close: "]" }, { open: "(", close: ")" }, { open: "'", close: "'" }, { open: "'''", close: "'''" }], autoClosingPairs: [{ open: "{", close: "}" }, { open: "[", close: "]" }, { open: "(", close: ")" }, { open: "'", close: "'", notIn: ["string", "comment"] }, { open: "'''", close: "'''", notIn: ["string", "comment"] }], autoCloseBefore: ":.,=}])' \n ", indentationRules: { increaseIndentPattern: new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"), decreaseIndentPattern: new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$") } }; var language = { defaultToken: "", tokenPostfix: ".bicep", brackets: [{ open: "{", close: "}", token: "delimiter.curly" }, { open: "[", close: "]", token: "delimiter.square" }, { open: "(", close: ")", token: "delimiter.parenthesis" }], symbols: /[=><!~?:&|+\-*/^%]+/, keywords: keywords, namedLiterals: namedLiterals, escapes: "\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)", tokenizer: { root: [{ include: "@expression" }, { include: "@whitespace" }], stringVerbatim: [{ regex: "(|'|'')[^']", action: { token: "string" } }, { regex: "'''", action: { token: "string.quote", next: "@pop" } }], stringLiteral: [{ regex: "\\${", action: { token: "delimiter.bracket", next: "@bracketCounting" } }, { regex: "[^\\\\'$]+", action: { token: "string" } }, { regex: "@escapes", action: { token: "string.escape" } }, { regex: "\\\\.", action: { token: "string.escape.invalid" } }, { regex: "'", action: { token: "string", next: "@pop" } }], bracketCounting: [{ regex: "{", action: { token: "delimiter.bracket", next: "@bracketCounting" } }, { regex: "}", action: { token: "delimiter.bracket", next: "@pop" } }, { include: "expression" }], comment: [{ regex: "[^\\*]+", action: { token: "comment" } }, { regex: "\\*\\/", action: { token: "comment", next: "@pop" } }, { regex: "[\\/*]", action: { token: "comment" } }], whitespace: [{ regex: nonCommentWs }, { regex: "\\/\\*", action: { token: "comment", next: "@comment" } }, { regex: "\\/\\/.*$", action: { token: "comment" } }], expression: [{ regex: "'''", action: { token: "string.quote", next: "@stringVerbatim" } }, { regex: "'", action: { token: "string.quote", next: "@stringLiteral" } }, { regex: numericLiteral, action: { token: "number" } }, { regex: identifier, action: { cases: { "@keywords": { token: "keyword" }, "@namedLiterals": { token: "keyword" }, "@default": { token: "identifier" } } } }] } }; /***/ }) }]);