yanzi-monaco-editorbb
Version:
这是一个基于微软的monaco和vue封装的一个代码编辑器,浏览器可运行。主要功能有:html、javascript、css代码编辑,高亮显示,语法错误提示等,可以帮您的项目很快的拥有一个web端的代码编辑器
87 lines (82 loc) • 3.92 kB
JavaScript
((typeof self !== 'undefined' ? self : this)["webpackJsonpyanziMonacoEditor"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpyanziMonacoEditor"] || []).push([[69],{
/***/ "2377":
/***/ (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; });
/*!-----------------------------------------------------------------------------
* 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/sparql/sparql.ts
var conf = {
comments: {
lineComment: "#"
},
brackets: [["{", "}"], ["[", "]"], ["(", ")"]],
autoClosingPairs: [{
open: "'",
close: "'",
notIn: ["string"]
}, {
open: '"',
close: '"',
notIn: ["string"]
}, {
open: "{",
close: "}"
}, {
open: "[",
close: "]"
}, {
open: "(",
close: ")"
}]
};
var language = {
defaultToken: "",
tokenPostfix: ".rq",
brackets: [{
token: "delimiter.curly",
open: "{",
close: "}"
}, {
token: "delimiter.parenthesis",
open: "(",
close: ")"
}, {
token: "delimiter.square",
open: "[",
close: "]"
}, {
token: "delimiter.angle",
open: "<",
close: ">"
}],
keywords: ["add", "as", "asc", "ask", "base", "by", "clear", "construct", "copy", "create", "data", "delete", "desc", "describe", "distinct", "drop", "false", "filter", "from", "graph", "group", "having", "in", "insert", "limit", "load", "minus", "move", "named", "not", "offset", "optional", "order", "prefix", "reduced", "select", "service", "silent", "to", "true", "undef", "union", "using", "values", "where", "with"],
builtinFunctions: ["a", "abs", "avg", "bind", "bnode", "bound", "ceil", "coalesce", "concat", "contains", "count", "datatype", "day", "encode_for_uri", "exists", "floor", "group_concat", "hours", "if", "iri", "isblank", "isiri", "isliteral", "isnumeric", "isuri", "lang", "langmatches", "lcase", "max", "md5", "min", "minutes", "month", "now", "rand", "regex", "replace", "round", "sameterm", "sample", "seconds", "sha1", "sha256", "sha384", "sha512", "str", "strafter", "strbefore", "strdt", "strends", "strlang", "strlen", "strstarts", "struuid", "substr", "sum", "timezone", "tz", "ucase", "uri", "uuid", "year"],
ignoreCase: true,
tokenizer: {
root: [[/<[^\s\u00a0>]*>?/, "tag"], {
include: "@strings"
}, [/#.*/, "comment"], [/[{}()\[\]]/, "@brackets"], [/[;,.]/, "delimiter"], [/[_\w\d]+:(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])*/, "tag"], [/:(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/, "tag"], [/[$?]?[_\w\d]+/, {
cases: {
"@keywords": {
token: "keyword"
},
"@builtinFunctions": {
token: "predefined.sql"
},
"@default": "identifier"
}
}], [/\^\^/, "operator.sql"], [/\^[*+\-<>=&|^\/!?]*/, "operator.sql"], [/[*+\-<>=&|\/!?]/, "operator.sql"], [/@[a-z\d\-]*/, "metatag.html"], [/\s+/, "white"]],
strings: [[/'([^'\\]|\\.)*$/, "string.invalid"], [/'$/, "string.sql", "@pop"], [/'/, "string.sql", "@stringBody"], [/"([^"\\]|\\.)*$/, "string.invalid"], [/"$/, "string.sql", "@pop"], [/"/, "string.sql", "@dblStringBody"]],
stringBody: [[/[^\\']+/, "string.sql"], [/\\./, "string.escape"], [/'/, "string.sql", "@pop"]],
dblStringBody: [[/[^\\"]+/, "string.sql"], [/\\./, "string.escape"], [/"/, "string.sql", "@pop"]]
}
};
/***/ })
}]);