This commit is contained in:
2025-11-02 19:17:20 +08:00
parent ebf784146e
commit e71b69db5f
2575 changed files with 1242294 additions and 95 deletions

View File

@@ -0,0 +1 @@
export {}

View File

@@ -0,0 +1,27 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.54.0(7c2310116c57517348bbd868a21139f32454be22)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/
// src/basic-languages/javascript/javascript.contribution.ts
import { registerLanguage } from "../_.contribution.js";
registerLanguage({
id: "javascript",
extensions: [".js", ".es6", ".jsx", ".mjs", ".cjs"],
firstLine: "^#!.*\\bnode",
filenames: ["jakefile"],
aliases: ["JavaScript", "javascript", "js"],
mimetypes: ["text/javascript"],
loader: () => {
if (false) {
return new Promise((resolve, reject) => {
__require(["vs/basic-languages/javascript/javascript"], resolve, reject);
});
} else {
return import("./javascript.js");
}
}
});

View File

@@ -0,0 +1,80 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.54.0(7c2310116c57517348bbd868a21139f32454be22)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/
// src/basic-languages/javascript/javascript.ts
import { conf as tsConf, language as tsLanguage } from "../typescript/typescript.js";
var conf = tsConf;
var language = {
// Set defaultToken to invalid to see what you do not tokenize yet
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",
"static",
"super",
"switch",
"symbol",
"this",
"throw",
"true",
"try",
"typeof",
"undefined",
"var",
"void",
"while",
"with",
"yield",
"async",
"await",
"of"
],
typeKeywords: [],
operators: tsLanguage.operators,
symbols: tsLanguage.symbols,
escapes: tsLanguage.escapes,
digits: tsLanguage.digits,
octaldigits: tsLanguage.octaldigits,
binarydigits: tsLanguage.binarydigits,
hexdigits: tsLanguage.hexdigits,
regexpctl: tsLanguage.regexpctl,
regexpesc: tsLanguage.regexpesc,
tokenizer: tsLanguage.tokenizer
};
export {
conf,
language
};