Alex Dima 5 years ago
parent 71919c681e
commit 8267281d21
No known key found for this signature in database
GPG Key ID: 6E58D7B045760DA0

8
package-lock.json generated

@ -84,7 +84,7 @@
}, },
"array-equal": { "array-equal": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", "resolved": "http://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
"integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=",
"dev": true "dev": true
}, },
@ -938,9 +938,9 @@
} }
}, },
"monaco-editor-core": { "monaco-editor-core": {
"version": "0.18.1", "version": "0.19.0",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.18.1.tgz", "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.19.0.tgz",
"integrity": "sha512-euzXzmwjZFG0oAPGjICMwINcZBzQDyfGDYlAR5YNMBJZO9Bmkqq1xpTTze/qQ0KKbVmawFXiwgUbg7WVgebP9Q==", "integrity": "sha512-wD60zpYDhsuJbzzLQigAteK2cA5fkuaDn+4c7NLwm/526OX5eL6MMvLhfvRgrDvLO00SYhFf6vz1y1C8M1hTpQ==",
"dev": true "dev": true
}, },
"monaco-plugin-helpers": { "monaco-plugin-helpers": {

@ -21,7 +21,7 @@
"glob": "^7.1.6", "glob": "^7.1.6",
"jsdom": "^15.2.1", "jsdom": "^15.2.1",
"mocha": "^6.2.2", "mocha": "^6.2.2",
"monaco-editor-core": "0.18.1", "monaco-editor-core": "0.19.0",
"monaco-plugin-helpers": "^1.0.2", "monaco-plugin-helpers": "^1.0.2",
"requirejs": "^2.3.6", "requirejs": "^2.3.6",
"terser": "^4.4.3", "terser": "^4.4.3",

@ -670,6 +670,36 @@ testTokenization('kotlin', [
{ startIndex: 22, type: '' }, { startIndex: 22, type: '' },
{ startIndex: 23, type: 'delimiter.curly.kt' }, { startIndex: 23, type: 'delimiter.curly.kt' },
] ]
}] }],
]);
[{
line: 'val text = """',
tokens: [
{ startIndex: 0, type: 'keyword.val.kt' },
{ startIndex: 3, type: '' },
{ startIndex: 4, type: 'identifier.kt' },
{ startIndex: 8, type: '' },
{ startIndex: 9, type: 'delimiter.kt' },
{ startIndex: 10, type: '' },
{ startIndex: 11, type: 'string.kt' },
]
},
{
line: ' for (c in "foo")',
tokens: [
{ startIndex: 0, type: 'string.kt' },
]
},
{
line: ' print(c)',
tokens: [
{ startIndex: 0, type: 'string.kt' },
]
},
{
line: '"""',
tokens: [
{ startIndex: 0, type: 'string.kt' },
]
}],
]);

@ -119,6 +119,7 @@ export const language = <ILanguage>{
// strings // strings
[/"([^"\\]|\\.)*$/, 'string.invalid'], // non-teminated string [/"([^"\\]|\\.)*$/, 'string.invalid'], // non-teminated string
[/"""/, 'string', '@multistring'],
[/"/, 'string', '@string'], [/"/, 'string', '@string'],
// characters // characters
@ -155,5 +156,13 @@ export const language = <ILanguage>{
[/\\./, 'string.escape.invalid'], [/\\./, 'string.escape.invalid'],
[/"/, 'string', '@pop'] [/"/, 'string', '@pop']
], ],
multistring: [
[/[^\\"]+/, 'string'],
[/@escapes/, 'string.escape'],
[/\\./, 'string.escape.invalid'],
[/"""/, 'string', '@pop'],
[/./, 'string']
],
}, },
}; };

@ -18,7 +18,7 @@ global.document = tmp.window.document;
global.navigator = tmp.window.navigator; global.navigator = tmp.window.navigator;
global.self = global; global.self = global;
global.document.queryCommandSupported = function () { return false; }; global.document.queryCommandSupported = function () { return false; };
global.window = { location: {} }; global.window = { location: {}, navigator: tmp.window.navigator };
requirejs(['./test/setup'], function () { requirejs(['./test/setup'], function () {
glob('release/dev/*/*.test.js', { cwd: path.dirname(__dirname) }, function (err, files) { glob('release/dev/*/*.test.js', { cwd: path.dirname(__dirname) }, function (err, files) {

Loading…
Cancel
Save