mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 20:52:56 +01:00
Reorganize project
This commit is contained in:
parent
49f2283894
commit
93c48edccc
121 changed files with 875 additions and 426 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
/.vscode/
|
/.vscode/
|
||||||
/release/**/test/
|
/release/**/*.test.js/
|
||||||
/scripts/
|
/scripts/
|
||||||
/src/
|
/src/
|
||||||
/test/
|
/test/
|
||||||
|
|
|
||||||
21
README.md
21
README.md
|
|
@ -52,25 +52,18 @@ This npm module is bundled and distributed in the [monaco-editor](https://www.np
|
||||||
|
|
||||||
## Dev: Adding a new language
|
## Dev: Adding a new language
|
||||||
|
|
||||||
* create `$/src/myLang.ts`
|
* create `$/src/myLang/myLang.contribution.ts`
|
||||||
* create `$/test/myLang.test.ts`
|
* create `$/src/myLang/myLang.ts`
|
||||||
|
* create `$/src/myLang/myLang.test.ts`
|
||||||
* restart compilation with `$> npm run watch`
|
* restart compilation with `$> npm run watch`
|
||||||
* edit `$/src/monaco.contribution.ts` and register your new language:
|
* edit `$/src/monaco.contribution.ts` and register your new language:
|
||||||
|
* edit `$/test/setup.js` and load your new language while testing
|
||||||
```js
|
```js
|
||||||
registerLanguage({
|
'release/dev/sql/sql.test',
|
||||||
id: 'sql',
|
|
||||||
extensions: [ '.sql' ],
|
|
||||||
aliases: [ 'SQL' ],
|
|
||||||
module: './sql'
|
|
||||||
});
|
|
||||||
```
|
```
|
||||||
* edit `$/test/all.js` and load your new language while testing
|
* edit `$/scripts/bundle.js` and ship your new language
|
||||||
```js
|
```js
|
||||||
'out/test/sql.test',
|
bundleOne('sql/sql'),
|
||||||
```
|
|
||||||
* edit `$/gulpfile.js` and ship your new language
|
|
||||||
```js
|
|
||||||
bundleOne('src/sql'),
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Code of Conduct
|
## Code of Conduct
|
||||||
|
|
|
||||||
|
|
@ -21,44 +21,44 @@ const BUNDLED_FILE_HEADER = [
|
||||||
].join('\n');
|
].join('\n');
|
||||||
|
|
||||||
bundleOne('monaco.contribution');
|
bundleOne('monaco.contribution');
|
||||||
bundleOne('bat');
|
bundleOne('bat/bat');
|
||||||
bundleOne('css');
|
bundleOne('css/css');
|
||||||
bundleOne('coffee');
|
bundleOne('coffee/coffee');
|
||||||
bundleOne('cpp');
|
bundleOne('cpp/cpp');
|
||||||
bundleOne('csharp');
|
bundleOne('csharp/csharp');
|
||||||
bundleOne('dockerfile');
|
bundleOne('dockerfile/dockerfile');
|
||||||
bundleOne('fsharp');
|
bundleOne('fsharp/fsharp');
|
||||||
bundleOne('go');
|
bundleOne('go/go');
|
||||||
bundleOne('handlebars');
|
bundleOne('handlebars/handlebars');
|
||||||
bundleOne('html');
|
bundleOne('html/html');
|
||||||
bundleOne('ini');
|
bundleOne('ini/ini');
|
||||||
bundleOne('pug');
|
bundleOne('pug/pug');
|
||||||
bundleOne('java');
|
bundleOne('java/java');
|
||||||
bundleOne('less');
|
bundleOne('less/less');
|
||||||
bundleOne('lua');
|
bundleOne('lua/lua');
|
||||||
bundleOne('markdown');
|
bundleOne('markdown/markdown');
|
||||||
bundleOne('msdax');
|
bundleOne('msdax/msdax');
|
||||||
bundleOne('objective-c');
|
bundleOne('objective-c/objective-c');
|
||||||
bundleOne('php');
|
bundleOne('php/php');
|
||||||
bundleOne('powershell');
|
bundleOne('powershell/powershell');
|
||||||
bundleOne('postiats');
|
bundleOne('postiats/postiats');
|
||||||
bundleOne('python');
|
bundleOne('python/python');
|
||||||
bundleOne('r');
|
bundleOne('r/r');
|
||||||
bundleOne('razor');
|
bundleOne('razor/razor');
|
||||||
bundleOne('ruby');
|
bundleOne('ruby/ruby');
|
||||||
bundleOne('scss');
|
bundleOne('scss/scss');
|
||||||
bundleOne('sql');
|
bundleOne('sql/sql');
|
||||||
bundleOne('swift');
|
bundleOne('swift/swift');
|
||||||
bundleOne('vb');
|
bundleOne('vb/vb');
|
||||||
bundleOne('xml');
|
bundleOne('xml/xml');
|
||||||
bundleOne('yaml');
|
bundleOne('yaml/yaml');
|
||||||
bundleOne('solidity');
|
bundleOne('solidity/solidity');
|
||||||
bundleOne('sb');
|
bundleOne('sb/sb');
|
||||||
bundleOne('mysql');
|
bundleOne('mysql/mysql');
|
||||||
bundleOne('redshift');
|
bundleOne('redshift/redshift');
|
||||||
bundleOne('pgsql');
|
bundleOne('pgsql/pgsql');
|
||||||
bundleOne('redis');
|
bundleOne('redis/redis');
|
||||||
bundleOne('csp');
|
bundleOne('csp/csp');
|
||||||
|
|
||||||
function bundleOne(moduleId, exclude) {
|
function bundleOne(moduleId, exclude) {
|
||||||
requirejs.optimize({
|
requirejs.optimize({
|
||||||
|
|
|
||||||
46
src/_.contribution.ts
Normal file
46
src/_.contribution.ts
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
interface ILang extends monaco.languages.ILanguageExtensionPoint {
|
||||||
|
loader: () => monaco.Promise<ILangImpl>;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ILangImpl {
|
||||||
|
conf: monaco.languages.LanguageConfiguration;
|
||||||
|
language: monaco.languages.IMonarchLanguage;
|
||||||
|
}
|
||||||
|
|
||||||
|
let languageDefinitions: { [languageId: string]: ILang } = {};
|
||||||
|
|
||||||
|
function _loadLanguage(languageId: string): monaco.Promise<void> {
|
||||||
|
const loader = languageDefinitions[languageId].loader;
|
||||||
|
return loader().then((mod) => {
|
||||||
|
_monaco.languages.setMonarchTokensProvider(languageId, mod.language);
|
||||||
|
_monaco.languages.setLanguageConfiguration(languageId, mod.conf);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
let languagePromises: { [languageId: string]: monaco.Promise<void> } = {};
|
||||||
|
|
||||||
|
export function loadLanguage(languageId: string): monaco.Promise<void> {
|
||||||
|
if (!languagePromises[languageId]) {
|
||||||
|
languagePromises[languageId] = _loadLanguage(languageId);
|
||||||
|
}
|
||||||
|
return languagePromises[languageId];
|
||||||
|
}
|
||||||
|
|
||||||
|
export function registerLanguage(def: ILang): void {
|
||||||
|
let languageId = def.id;
|
||||||
|
|
||||||
|
languageDefinitions[languageId] = def;
|
||||||
|
_monaco.languages.register(def);
|
||||||
|
_monaco.languages.onLanguage(languageId, () => {
|
||||||
|
loadLanguage(languageId);
|
||||||
|
});
|
||||||
|
}
|
||||||
17
src/bat/bat.contribution.ts
Normal file
17
src/bat/bat.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'bat',
|
||||||
|
extensions: ['.bat', '.cmd'],
|
||||||
|
aliases: ['Batch', 'bat'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./bat'))
|
||||||
|
});
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('bat', [
|
testTokenization('bat', [
|
||||||
// Keywords
|
// Keywords
|
||||||
18
src/coffee/coffee.contribution.ts
Normal file
18
src/coffee/coffee.contribution.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'coffeescript',
|
||||||
|
extensions: ['.coffee'],
|
||||||
|
aliases: ['CoffeeScript', 'coffeescript', 'coffee'],
|
||||||
|
mimetypes: ['text/x-coffeescript', 'text/coffeescript'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./coffee'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('coffeescript', [
|
testTokenization('coffeescript', [
|
||||||
// Comments
|
// Comments
|
||||||
23
src/cpp/cpp.contribution.ts
Normal file
23
src/cpp/cpp.contribution.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'c',
|
||||||
|
extensions: ['.c', '.h'],
|
||||||
|
aliases: ['C', 'c'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./cpp'))
|
||||||
|
});
|
||||||
|
registerLanguage({
|
||||||
|
id: 'cpp',
|
||||||
|
extensions: ['.cpp', '.cc', '.cxx', '.hpp', '.hh', '.hxx'],
|
||||||
|
aliases: ['C++', 'Cpp', 'cpp'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./cpp'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('cpp', [
|
testTokenization('cpp', [
|
||||||
// Keywords
|
// Keywords
|
||||||
17
src/csharp/csharp.contribution.ts
Normal file
17
src/csharp/csharp.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'csharp',
|
||||||
|
extensions: ['.cs', '.csx'],
|
||||||
|
aliases: ['C#', 'csharp'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./csharp'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('csharp', [
|
testTokenization('csharp', [
|
||||||
|
|
||||||
17
src/csp/csp.contribution.ts
Normal file
17
src/csp/csp.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'csp',
|
||||||
|
extensions: [],
|
||||||
|
aliases: ['CSP', 'csp'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./csp'))
|
||||||
|
});
|
||||||
|
|
@ -5,6 +5,6 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('csp', []);
|
testTokenization('csp', []);
|
||||||
18
src/css/css.contribution.ts
Normal file
18
src/css/css.contribution.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'css',
|
||||||
|
extensions: ['.css'],
|
||||||
|
aliases: ['CSS', 'css'],
|
||||||
|
mimetypes: ['text/css'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./css'))
|
||||||
|
});
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('css', [
|
testTokenization('css', [
|
||||||
// Skip whitespace
|
// Skip whitespace
|
||||||
18
src/dockerfile/dockerfile.contribution.ts
Normal file
18
src/dockerfile/dockerfile.contribution.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'dockerfile',
|
||||||
|
extensions: ['.dockerfile'],
|
||||||
|
filenames: ['Dockerfile'],
|
||||||
|
aliases: ['Dockerfile'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./dockerfile'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('dockerfile', [
|
testTokenization('dockerfile', [
|
||||||
// All
|
// All
|
||||||
17
src/fsharp/fsharp.contribution.ts
Normal file
17
src/fsharp/fsharp.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'fsharp',
|
||||||
|
extensions: ['.fs', '.fsi', '.ml', '.mli', '.fsx', '.fsscript'],
|
||||||
|
aliases: ['F#', 'FSharp', 'fsharp'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./fsharp'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('fsharp', [
|
testTokenization('fsharp', [
|
||||||
// comments - single line
|
// comments - single line
|
||||||
17
src/go/go.contribution.ts
Normal file
17
src/go/go.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'go',
|
||||||
|
extensions: ['.go'],
|
||||||
|
aliases: ['Go'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./go'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('go', [
|
testTokenization('go', [
|
||||||
// Tests
|
// Tests
|
||||||
18
src/handlebars/handlebars.contribution.ts
Normal file
18
src/handlebars/handlebars.contribution.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'handlebars',
|
||||||
|
extensions: ['.handlebars', '.hbs'],
|
||||||
|
aliases: ['Handlebars', 'handlebars'],
|
||||||
|
mimetypes: ['text/x-handlebars-template'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./handlebars'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization(['handlebars', 'css'], [
|
testTokenization(['handlebars', 'css'], [
|
||||||
|
|
||||||
18
src/html/html.contribution.ts
Normal file
18
src/html/html.contribution.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'html',
|
||||||
|
extensions: ['.html', '.htm', '.shtml', '.xhtml', '.mdoc', '.jsp', '.asp', '.aspx', '.jshtm'],
|
||||||
|
aliases: ['HTML', 'htm', 'html', 'xhtml'],
|
||||||
|
mimetypes: ['text/html', 'text/x-jshtm', 'text/template', 'text/ng-template'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./html'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization(['html', 'css'], [
|
testTokenization(['html', 'css'], [
|
||||||
|
|
||||||
18
src/ini/ini.contribution.ts
Normal file
18
src/ini/ini.contribution.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'ini',
|
||||||
|
extensions: ['.ini', '.properties', '.gitconfig'],
|
||||||
|
filenames: ['config', '.gitattributes', '.gitconfig', '.editorconfig'],
|
||||||
|
aliases: ['Ini', 'ini'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./ini'))
|
||||||
|
});
|
||||||
18
src/java/java.contribution.ts
Normal file
18
src/java/java.contribution.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'java',
|
||||||
|
extensions: ['.java', '.jav'],
|
||||||
|
aliases: ['Java', 'java'],
|
||||||
|
mimetypes: ['text/x-java-source', 'text/x-java'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./java'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('java', [
|
testTokenization('java', [
|
||||||
// Comments - single line
|
// Comments - single line
|
||||||
18
src/less/less.contribution.ts
Normal file
18
src/less/less.contribution.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'less',
|
||||||
|
extensions: ['.less'],
|
||||||
|
aliases: ['Less', 'less'],
|
||||||
|
mimetypes: ['text/x-less', 'text/less'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./less'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization(['less'], [
|
testTokenization(['less'], [
|
||||||
|
|
||||||
17
src/lua/lua.contribution.ts
Normal file
17
src/lua/lua.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'lua',
|
||||||
|
extensions: ['.lua'],
|
||||||
|
aliases: ['Lua', 'lua'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./lua'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('lua', [
|
testTokenization('lua', [
|
||||||
|
|
||||||
17
src/markdown/markdown.contribution.ts
Normal file
17
src/markdown/markdown.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'markdown',
|
||||||
|
extensions: ['.md', '.markdown', '.mdown', '.mkdn', '.mkd', '.mdwn', '.mdtxt', '.mdtext'],
|
||||||
|
aliases: ['Markdown', 'markdown'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./markdown'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('markdown', [
|
testTokenization('markdown', [
|
||||||
|
|
||||||
0
src/test/mocha.d.ts → src/mocha.d.ts
vendored
0
src/test/mocha.d.ts → src/mocha.d.ts
vendored
|
|
@ -4,301 +4,41 @@
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Allow for running under nodejs/requirejs in tests
|
import './bat/bat.contribution';
|
||||||
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
import './coffee/coffee.contribution';
|
||||||
|
import './cpp/cpp.contribution';
|
||||||
interface ILang extends monaco.languages.ILanguageExtensionPoint {
|
import './csharp/csharp.contribution';
|
||||||
loader: () => monaco.Promise<ILangImpl>;
|
import './csp/csp.contribution';
|
||||||
}
|
import './css/css.contribution';
|
||||||
|
import './dockerfile/dockerfile.contribution';
|
||||||
interface ILangImpl {
|
import './fsharp/fsharp.contribution';
|
||||||
conf: monaco.languages.LanguageConfiguration;
|
import './go/go.contribution';
|
||||||
language: monaco.languages.IMonarchLanguage;
|
import './handlebars/handlebars.contribution';
|
||||||
}
|
import './html/html.contribution';
|
||||||
|
import './ini/ini.contribution';
|
||||||
let languageDefinitions: { [languageId: string]: ILang } = {};
|
import './java/java.contribution';
|
||||||
|
import './less/less.contribution';
|
||||||
function _loadLanguage(languageId: string): monaco.Promise<void> {
|
import './lua/lua.contribution';
|
||||||
const loader = languageDefinitions[languageId].loader;
|
import './markdown/markdown.contribution';
|
||||||
return loader().then((mod) => {
|
import './msdax/msdax.contribution';
|
||||||
_monaco.languages.setMonarchTokensProvider(languageId, mod.language);
|
import './mysql/mysql.contribution';
|
||||||
_monaco.languages.setLanguageConfiguration(languageId, mod.conf);
|
import './objective-c/objective-c.contribution';
|
||||||
});
|
import './pgsql/pgsql.contribution';
|
||||||
}
|
import './php/php.contribution';
|
||||||
|
import './postiats/postiats.contribution';
|
||||||
let languagePromises: { [languageId: string]: monaco.Promise<void> } = {};
|
import './powershell/powershell.contribution';
|
||||||
|
import './pug/pug.contribution';
|
||||||
export function loadLanguage(languageId: string): monaco.Promise<void> {
|
import './python/python.contribution';
|
||||||
if (!languagePromises[languageId]) {
|
import './r/r.contribution';
|
||||||
languagePromises[languageId] = _loadLanguage(languageId);
|
import './razor/razor.contribution';
|
||||||
}
|
import './redis/redis.contribution';
|
||||||
return languagePromises[languageId];
|
import './redshift/redshift.contribution';
|
||||||
}
|
import './ruby/ruby.contribution';
|
||||||
|
import './sb/sb.contribution';
|
||||||
function registerLanguage(def: ILang): void {
|
import './scss/scss.contribution';
|
||||||
let languageId = def.id;
|
import './solidity/solidity.contribution';
|
||||||
|
import './sql/sql.contribution';
|
||||||
languageDefinitions[languageId] = def;
|
import './swift/swift.contribution';
|
||||||
_monaco.languages.register(def);
|
import './vb/vb.contribution';
|
||||||
_monaco.languages.onLanguage(languageId, () => {
|
import './xml/xml.contribution';
|
||||||
loadLanguage(languageId);
|
import './yaml/yaml.contribution';
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
registerLanguage({
|
|
||||||
id: 'bat',
|
|
||||||
extensions: ['.bat', '.cmd'],
|
|
||||||
aliases: ['Batch', 'bat'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./bat'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'coffeescript',
|
|
||||||
extensions: ['.coffee'],
|
|
||||||
aliases: ['CoffeeScript', 'coffeescript', 'coffee'],
|
|
||||||
mimetypes: ['text/x-coffeescript', 'text/coffeescript'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./coffee'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'c',
|
|
||||||
extensions: ['.c', '.h'],
|
|
||||||
aliases: ['C', 'c'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./cpp'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'cpp',
|
|
||||||
extensions: ['.cpp', '.cc', '.cxx', '.hpp', '.hh', '.hxx'],
|
|
||||||
aliases: ['C++', 'Cpp', 'cpp'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./cpp'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'csharp',
|
|
||||||
extensions: ['.cs', '.csx'],
|
|
||||||
aliases: ['C#', 'csharp'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./csharp'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'dockerfile',
|
|
||||||
extensions: ['.dockerfile'],
|
|
||||||
filenames: ['Dockerfile'],
|
|
||||||
aliases: ['Dockerfile'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./dockerfile'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'fsharp',
|
|
||||||
extensions: ['.fs', '.fsi', '.ml', '.mli', '.fsx', '.fsscript'],
|
|
||||||
aliases: ['F#', 'FSharp', 'fsharp'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./fsharp'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'go',
|
|
||||||
extensions: ['.go'],
|
|
||||||
aliases: ['Go'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./go'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'handlebars',
|
|
||||||
extensions: ['.handlebars', '.hbs'],
|
|
||||||
aliases: ['Handlebars', 'handlebars'],
|
|
||||||
mimetypes: ['text/x-handlebars-template'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./handlebars'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'html',
|
|
||||||
extensions: ['.html', '.htm', '.shtml', '.xhtml', '.mdoc', '.jsp', '.asp', '.aspx', '.jshtm'],
|
|
||||||
aliases: ['HTML', 'htm', 'html', 'xhtml'],
|
|
||||||
mimetypes: ['text/html', 'text/x-jshtm', 'text/template', 'text/ng-template'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./html'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'ini',
|
|
||||||
extensions: ['.ini', '.properties', '.gitconfig'],
|
|
||||||
filenames: ['config', '.gitattributes', '.gitconfig', '.editorconfig'],
|
|
||||||
aliases: ['Ini', 'ini'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./ini'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'pug',
|
|
||||||
extensions: ['.jade', '.pug'],
|
|
||||||
aliases: ['Pug', 'Jade', 'jade'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./pug'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'java',
|
|
||||||
extensions: ['.java', '.jav'],
|
|
||||||
aliases: ['Java', 'java'],
|
|
||||||
mimetypes: ['text/x-java-source', 'text/x-java'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./java'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'lua',
|
|
||||||
extensions: ['.lua'],
|
|
||||||
aliases: ['Lua', 'lua'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./lua'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'markdown',
|
|
||||||
extensions: ['.md', '.markdown', '.mdown', '.mkdn', '.mkd', '.mdwn', '.mdtxt', '.mdtext'],
|
|
||||||
aliases: ['Markdown', 'markdown'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./markdown'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'msdax',
|
|
||||||
extensions: ['.dax', '.msdax'],
|
|
||||||
aliases: ['DAX', 'MSDAX'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./msdax'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'objective-c',
|
|
||||||
extensions: ['.m'],
|
|
||||||
aliases: ['Objective-C'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./objective-c'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'postiats',
|
|
||||||
extensions: ['.dats', '.sats', '.hats'],
|
|
||||||
aliases: ['ATS', 'ATS/Postiats'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./postiats'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'php',
|
|
||||||
extensions: ['.php', '.php4', '.php5', '.phtml', '.ctp'],
|
|
||||||
aliases: ['PHP', 'php'],
|
|
||||||
mimetypes: ['application/x-php'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./php'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'powershell',
|
|
||||||
extensions: ['.ps1', '.psm1', '.psd1'],
|
|
||||||
aliases: ['PowerShell', 'powershell', 'ps', 'ps1'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./powershell'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'python',
|
|
||||||
extensions: ['.py', '.rpy', '.pyw', '.cpy', '.gyp', '.gypi'],
|
|
||||||
aliases: ['Python', 'py'],
|
|
||||||
firstLine: '^#!/.*\\bpython[0-9.-]*\\b',
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./python'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'r',
|
|
||||||
extensions: ['.r', '.rhistory', '.rprofile', '.rt'],
|
|
||||||
aliases: ['R', 'r'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./r'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'razor',
|
|
||||||
extensions: ['.cshtml'],
|
|
||||||
aliases: ['Razor', 'razor'],
|
|
||||||
mimetypes: ['text/x-cshtml'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./razor'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'ruby',
|
|
||||||
extensions: ['.rb', '.rbx', '.rjs', '.gemspec', '.pp'],
|
|
||||||
filenames: ['rakefile'],
|
|
||||||
aliases: ['Ruby', 'rb'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./ruby'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'swift',
|
|
||||||
aliases: ['Swift', 'swift'],
|
|
||||||
extensions: ['.swift'],
|
|
||||||
mimetypes: ['text/swift'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./swift'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'sql',
|
|
||||||
extensions: ['.sql'],
|
|
||||||
aliases: ['SQL'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./sql'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'vb',
|
|
||||||
extensions: ['.vb'],
|
|
||||||
aliases: ['Visual Basic', 'vb'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./vb'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'xml',
|
|
||||||
extensions: ['.xml', '.dtd', '.ascx', '.csproj', '.config', '.wxi', '.wxl', '.wxs', '.xaml', '.svg', '.svgz'],
|
|
||||||
firstLine: '(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)',
|
|
||||||
aliases: ['XML', 'xml'],
|
|
||||||
mimetypes: ['text/xml', 'application/xml', 'application/xaml+xml', 'application/xml-dtd'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./xml'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'less',
|
|
||||||
extensions: ['.less'],
|
|
||||||
aliases: ['Less', 'less'],
|
|
||||||
mimetypes: ['text/x-less', 'text/less'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./less'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'scss',
|
|
||||||
extensions: ['.scss'],
|
|
||||||
aliases: ['Sass', 'sass', 'scss'],
|
|
||||||
mimetypes: ['text/x-scss', 'text/scss'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./scss'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'css',
|
|
||||||
extensions: ['.css'],
|
|
||||||
aliases: ['CSS', 'css'],
|
|
||||||
mimetypes: ['text/css'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./css'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'yaml',
|
|
||||||
extensions: ['.yaml', '.yml'],
|
|
||||||
aliases: ['YAML', 'yaml', 'YML', 'yml'],
|
|
||||||
mimetypes: ['application/x-yaml'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./yaml'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'sol',
|
|
||||||
extensions: ['.sol'],
|
|
||||||
aliases: ['sol', 'solidity', 'Solidity'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./solidity'))
|
|
||||||
});
|
|
||||||
registerLanguage({
|
|
||||||
id: 'sb',
|
|
||||||
extensions: ['.sb'],
|
|
||||||
aliases: ['Small Basic', 'sb'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./sb'))
|
|
||||||
});
|
|
||||||
|
|
||||||
registerLanguage({
|
|
||||||
id: 'mysql',
|
|
||||||
extensions: [],
|
|
||||||
aliases: ['MySQL', 'mysql'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./mysql'))
|
|
||||||
});
|
|
||||||
|
|
||||||
registerLanguage({
|
|
||||||
id: 'pgsql',
|
|
||||||
extensions: [],
|
|
||||||
aliases: ['PostgreSQL', 'postgres', 'pg', 'postgre'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./pgsql'))
|
|
||||||
});
|
|
||||||
|
|
||||||
registerLanguage({
|
|
||||||
id: 'redshift',
|
|
||||||
extensions: [],
|
|
||||||
aliases: ['Redshift', 'redshift'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./redshift'))
|
|
||||||
});
|
|
||||||
|
|
||||||
registerLanguage({
|
|
||||||
id: 'redis',
|
|
||||||
extensions: ['.redis'],
|
|
||||||
aliases: ['redis'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./redis'))
|
|
||||||
});
|
|
||||||
|
|
||||||
registerLanguage({
|
|
||||||
id: 'csp',
|
|
||||||
extensions: [],
|
|
||||||
aliases: ['CSP', 'csp'],
|
|
||||||
loader: () => _monaco.Promise.wrap(import('./csp'))
|
|
||||||
});
|
|
||||||
|
|
|
||||||
17
src/msdax/msdax.contribution.ts
Normal file
17
src/msdax/msdax.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'msdax',
|
||||||
|
extensions: ['.dax', '.msdax'],
|
||||||
|
aliases: ['DAX', 'MSDAX'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./msdax'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('msdax', [
|
testTokenization('msdax', [
|
||||||
// Comments
|
// Comments
|
||||||
17
src/mysql/mysql.contribution.ts
Normal file
17
src/mysql/mysql.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'mysql',
|
||||||
|
extensions: [],
|
||||||
|
aliases: ['MySQL', 'mysql'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./mysql'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('mysql', [
|
testTokenization('mysql', [
|
||||||
// Comments
|
// Comments
|
||||||
17
src/objective-c/objective-c.contribution.ts
Normal file
17
src/objective-c/objective-c.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'objective-c',
|
||||||
|
extensions: ['.m'],
|
||||||
|
aliases: ['Objective-C'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./objective-c'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('objective-c', [
|
testTokenization('objective-c', [
|
||||||
// Keywords
|
// Keywords
|
||||||
17
src/pgsql/pgsql.contribution.ts
Normal file
17
src/pgsql/pgsql.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'pgsql',
|
||||||
|
extensions: [],
|
||||||
|
aliases: ['PostgreSQL', 'postgres', 'pg', 'postgre'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./pgsql'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('sql', [
|
testTokenization('sql', [
|
||||||
// Comments
|
// Comments
|
||||||
18
src/php/php.contribution.ts
Normal file
18
src/php/php.contribution.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'php',
|
||||||
|
extensions: ['.php', '.php4', '.php5', '.phtml', '.ctp'],
|
||||||
|
aliases: ['PHP', 'php'],
|
||||||
|
mimetypes: ['application/x-php'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./php'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization(['php', 'css'], [
|
testTokenization(['php', 'css'], [
|
||||||
// Bug 13596:[ErrorTelemetry] Stream did not advance while tokenizing. Mode id is php (stuck)
|
// Bug 13596:[ErrorTelemetry] Stream did not advance while tokenizing. Mode id is php (stuck)
|
||||||
17
src/postiats/postiats.contribution.ts
Normal file
17
src/postiats/postiats.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'postiats',
|
||||||
|
extensions: ['.dats', '.sats', '.hats'],
|
||||||
|
aliases: ['ATS', 'ATS/Postiats'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./postiats'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('postiats', [
|
testTokenization('postiats', [
|
||||||
// Keywords
|
// Keywords
|
||||||
17
src/powershell/powershell.contribution.ts
Normal file
17
src/powershell/powershell.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'powershell',
|
||||||
|
extensions: ['.ps1', '.psm1', '.psd1'],
|
||||||
|
aliases: ['PowerShell', 'powershell', 'ps', 'ps1'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./powershell'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('powershell', [
|
testTokenization('powershell', [
|
||||||
// Comments - single line
|
// Comments - single line
|
||||||
17
src/pug/pug.contribution.ts
Normal file
17
src/pug/pug.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'pug',
|
||||||
|
extensions: ['.jade', '.pug'],
|
||||||
|
aliases: ['Pug', 'Jade', 'jade'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./pug'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('pug', [
|
testTokenization('pug', [
|
||||||
// Tags [Pug]
|
// Tags [Pug]
|
||||||
18
src/python/python.contribution.ts
Normal file
18
src/python/python.contribution.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'python',
|
||||||
|
extensions: ['.py', '.rpy', '.pyw', '.cpy', '.gyp', '.gypi'],
|
||||||
|
aliases: ['Python', 'py'],
|
||||||
|
firstLine: '^#!/.*\\bpython[0-9.-]*\\b',
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./python'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('python', [
|
testTokenization('python', [
|
||||||
// Keywords
|
// Keywords
|
||||||
17
src/r/r.contribution.ts
Normal file
17
src/r/r.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'r',
|
||||||
|
extensions: ['.r', '.rhistory', '.rprofile', '.rt'],
|
||||||
|
aliases: ['R', 'r'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./r'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('r', [
|
testTokenization('r', [
|
||||||
// Keywords
|
// Keywords
|
||||||
18
src/razor/razor.contribution.ts
Normal file
18
src/razor/razor.contribution.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'razor',
|
||||||
|
extensions: ['.cshtml'],
|
||||||
|
aliases: ['Razor', 'razor'],
|
||||||
|
mimetypes: ['text/x-cshtml'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./razor'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('razor', [
|
testTokenization('razor', [
|
||||||
|
|
||||||
17
src/redis/redis.contribution.ts
Normal file
17
src/redis/redis.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'redis',
|
||||||
|
extensions: ['.redis'],
|
||||||
|
aliases: ['redis'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./redis'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('redis', [
|
testTokenization('redis', [
|
||||||
|
|
||||||
17
src/redshift/redshift.contribution.ts
Normal file
17
src/redshift/redshift.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'redshift',
|
||||||
|
extensions: [],
|
||||||
|
aliases: ['Redshift', 'redshift'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./redshift'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('sql', [
|
testTokenization('sql', [
|
||||||
// Comments
|
// Comments
|
||||||
18
src/ruby/ruby.contribution.ts
Normal file
18
src/ruby/ruby.contribution.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'ruby',
|
||||||
|
extensions: ['.rb', '.rbx', '.rjs', '.gemspec', '.pp'],
|
||||||
|
filenames: ['rakefile'],
|
||||||
|
aliases: ['Ruby', 'rb'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./ruby'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('ruby', [
|
testTokenization('ruby', [
|
||||||
// Keywords
|
// Keywords
|
||||||
17
src/sb/sb.contribution.ts
Normal file
17
src/sb/sb.contribution.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'sb',
|
||||||
|
extensions: ['.sb'],
|
||||||
|
aliases: ['Small Basic', 'sb'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./sb'))
|
||||||
|
});
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization } from './testRunner';
|
import { testTokenization } from '../test/testRunner';
|
||||||
|
|
||||||
testTokenization('sb', [
|
testTokenization('sb', [
|
||||||
|
|
||||||
18
src/scss/scss.contribution.ts
Normal file
18
src/scss/scss.contribution.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import { registerLanguage } from '../_.contribution';
|
||||||
|
|
||||||
|
// Allow for running under nodejs/requirejs in tests
|
||||||
|
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||||
|
|
||||||
|
registerLanguage({
|
||||||
|
id: 'scss',
|
||||||
|
extensions: ['.scss'],
|
||||||
|
aliases: ['Sass', 'sass', 'scss'],
|
||||||
|
mimetypes: ['text/x-scss', 'text/scss'],
|
||||||
|
loader: () => _monaco.Promise.wrap(import('./scss'))
|
||||||
|
});
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { testTokenization as actualTestTokenization, ITestItem } from './testRunner';
|
import { testTokenization as actualTestTokenization, ITestItem } from '../test/testRunner';
|
||||||
|
|
||||||
function testTokenization(_language: string | string[], tests: ITestItem[][]): void {
|
function testTokenization(_language: string | string[], tests: ITestItem[][]): void {
|
||||||
tests = tests.map(t => {
|
tests = tests.map(t => {
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue