25 lines
899 B
JavaScript
25 lines
899 B
JavaScript
|
/*!-----------------------------------------------------------------------------
|
||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
|
* Version: 0.36.1(6c56744c3419458f0dd48864520b759d1a3a1ca8)
|
||
|
* Released under the MIT license
|
||
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
||
|
*-----------------------------------------------------------------------------*/
|
||
|
|
||
|
// src/basic-languages/python/python.contribution.ts
|
||
|
import { registerLanguage } from "../_.contribution.js";
|
||
|
registerLanguage({
|
||
|
id: "python",
|
||
|
extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
|
||
|
aliases: ["Python", "py"],
|
||
|
firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
|
||
|
loader: () => {
|
||
|
if (false) {
|
||
|
return new Promise((resolve, reject) => {
|
||
|
__require(["vs/basic-languages/python/python"], resolve, reject);
|
||
|
});
|
||
|
} else {
|
||
|
return import("./python.js");
|
||
|
}
|
||
|
}
|
||
|
});
|