mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Move basic languages sources to /src/
This commit is contained in:
parent
d5e3af3744
commit
0f7286cf55
247 changed files with 138 additions and 210 deletions
76
src/basic-languages/javascript/javascript.ts
Normal file
76
src/basic-languages/javascript/javascript.ts
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { conf as tsConf, language as tsLanguage } from '../typescript/typescript';
|
||||
import type { languages } from '../../fillers/monaco-editor-core';
|
||||
|
||||
export const conf: languages.LanguageConfiguration = tsConf;
|
||||
|
||||
export const language = <languages.IMonarchLanguage>{
|
||||
// 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',
|
||||
'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
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue