mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 22:02:55 +01:00
Merge branch 'main' into main
This commit is contained in:
commit
bc083f4db3
9 changed files with 76 additions and 24 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -5,7 +5,7 @@ on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: CI
|
name: CI
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
|
|
||||||
14
package-lock.json
generated
14
package-lock.json
generated
|
|
@ -23,7 +23,7 @@
|
||||||
"jsdom": "^19.0.0",
|
"jsdom": "^19.0.0",
|
||||||
"jsonc-parser": "^3.0.0",
|
"jsonc-parser": "^3.0.0",
|
||||||
"mocha": "^9.2.0",
|
"mocha": "^9.2.0",
|
||||||
"monaco-editor-core": "0.35.0-dev.20221018.2",
|
"monaco-editor-core": "0.35.0-dev.20221208",
|
||||||
"parcel": "^2.7.0",
|
"parcel": "^2.7.0",
|
||||||
"playwright": "^1.18.1",
|
"playwright": "^1.18.1",
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
|
|
@ -4519,9 +4519,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/monaco-editor-core": {
|
"node_modules/monaco-editor-core": {
|
||||||
"version": "0.35.0-dev.20221018.2",
|
"version": "0.35.0-dev.20221208",
|
||||||
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.35.0-dev.20221018.2.tgz",
|
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.35.0-dev.20221208.tgz",
|
||||||
"integrity": "sha512-RHx0zCV7y7WZHL6o4AWDd+SlXaXOegWVcg+tDxnyCrttqGfyh8q2Lwdx6Js+hKdCM2MFiiOkJoROMPQqiDIhbQ==",
|
"integrity": "sha512-XQpKe+FoGoIWDqn/xiz5+Iyi1PrVWArlrBqqkQuWu4IBjUvs7/krZLqnsy/Vfoflu9Ldtoc1JU9wNu0tyDv66A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/mri": {
|
"node_modules/mri": {
|
||||||
|
|
@ -9999,9 +9999,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"monaco-editor-core": {
|
"monaco-editor-core": {
|
||||||
"version": "0.35.0-dev.20221018.2",
|
"version": "0.35.0-dev.20221208",
|
||||||
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.35.0-dev.20221018.2.tgz",
|
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.35.0-dev.20221208.tgz",
|
||||||
"integrity": "sha512-RHx0zCV7y7WZHL6o4AWDd+SlXaXOegWVcg+tDxnyCrttqGfyh8q2Lwdx6Js+hKdCM2MFiiOkJoROMPQqiDIhbQ==",
|
"integrity": "sha512-XQpKe+FoGoIWDqn/xiz5+Iyi1PrVWArlrBqqkQuWu4IBjUvs7/krZLqnsy/Vfoflu9Ldtoc1JU9wNu0tyDv66A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"mri": {
|
"mri": {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
"jsdom": "^19.0.0",
|
"jsdom": "^19.0.0",
|
||||||
"jsonc-parser": "^3.0.0",
|
"jsonc-parser": "^3.0.0",
|
||||||
"mocha": "^9.2.0",
|
"mocha": "^9.2.0",
|
||||||
"monaco-editor-core": "0.35.0-dev.20221018.2",
|
"monaco-editor-core": "0.35.0-dev.20221208",
|
||||||
"parcel": "^2.7.0",
|
"parcel": "^2.7.0",
|
||||||
"playwright": "^1.18.1",
|
"playwright": "^1.18.1",
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
|
|
|
||||||
14
samples/package-lock.json
generated
14
samples/package-lock.json
generated
|
|
@ -10,7 +10,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"css-loader": "^5.2.7",
|
"css-loader": "^5.2.7",
|
||||||
"electron": "^19.1.6",
|
"electron": "^19.1.8",
|
||||||
"file-loader": "^6.2.0",
|
"file-loader": "^6.2.0",
|
||||||
"glob": "^7.2.0",
|
"glob": "^7.2.0",
|
||||||
"html-webpack-plugin": "^5.5.0",
|
"html-webpack-plugin": "^5.5.0",
|
||||||
|
|
@ -1372,9 +1372,9 @@
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/electron": {
|
"node_modules/electron": {
|
||||||
"version": "19.1.6",
|
"version": "19.1.8",
|
||||||
"resolved": "https://registry.npmjs.org/electron/-/electron-19.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/electron/-/electron-19.1.8.tgz",
|
||||||
"integrity": "sha512-bT6Mr7JbHbONpr/U7R47lwTkMUvuAyOfnoLlbDqvGocQyZCCN3JB436wtf2+r3/IpMEz3T+dHLweFDY5i2wuxw==",
|
"integrity": "sha512-UfPQdFjgKI0xCm1V5sV3iAVOs0kCwAE91xWzV5tI7ij14yOkxTdXp9BqTzFaSbQYLYxn6q1BUUe1nlzjJjzAnw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
@ -5427,9 +5427,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"electron": {
|
"electron": {
|
||||||
"version": "19.1.6",
|
"version": "19.1.8",
|
||||||
"resolved": "https://registry.npmjs.org/electron/-/electron-19.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/electron/-/electron-19.1.8.tgz",
|
||||||
"integrity": "sha512-bT6Mr7JbHbONpr/U7R47lwTkMUvuAyOfnoLlbDqvGocQyZCCN3JB436wtf2+r3/IpMEz3T+dHLweFDY5i2wuxw==",
|
"integrity": "sha512-UfPQdFjgKI0xCm1V5sV3iAVOs0kCwAE91xWzV5tI7ij14yOkxTdXp9BqTzFaSbQYLYxn6q1BUUe1nlzjJjzAnw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@electron/get": "2.0.0",
|
"@electron/get": "2.0.0",
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"css-loader": "^5.2.7",
|
"css-loader": "^5.2.7",
|
||||||
"electron": "^19.1.6",
|
"electron": "^19.1.8",
|
||||||
"file-loader": "^6.2.0",
|
"file-loader": "^6.2.0",
|
||||||
"glob": "^7.2.0",
|
"glob": "^7.2.0",
|
||||||
"html-webpack-plugin": "^5.5.0",
|
"html-webpack-plugin": "^5.5.0",
|
||||||
|
|
|
||||||
|
|
@ -383,5 +383,32 @@ testTokenization('elixir', [
|
||||||
{ startIndex: 15, type: 'delimiter.square.elixir' }
|
{ startIndex: 15, type: 'delimiter.square.elixir' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
// Bitstrings
|
||||||
|
[
|
||||||
|
{
|
||||||
|
line: '<<height::32-integer, width::32-integer, data::binary>>',
|
||||||
|
tokens: [
|
||||||
|
{ startIndex: 0, type: 'delimiter.angle.special.elixir' },
|
||||||
|
{ startIndex: 2, type: 'identifier.elixir' },
|
||||||
|
{ startIndex: 8, type: 'operator.elixir' },
|
||||||
|
{ startIndex: 10, type: 'number.elixir' },
|
||||||
|
{ startIndex: 12, type: 'operator.elixir' },
|
||||||
|
{ startIndex: 13, type: 'identifier.elixir' },
|
||||||
|
{ startIndex: 20, type: 'punctuation.elixir' },
|
||||||
|
{ startIndex: 21, type: 'white.elixir' },
|
||||||
|
{ startIndex: 22, type: 'identifier.elixir' },
|
||||||
|
{ startIndex: 27, type: 'operator.elixir' },
|
||||||
|
{ startIndex: 29, type: 'number.elixir' },
|
||||||
|
{ startIndex: 31, type: 'operator.elixir' },
|
||||||
|
{ startIndex: 32, type: 'identifier.elixir' },
|
||||||
|
{ startIndex: 39, type: 'punctuation.elixir' },
|
||||||
|
{ startIndex: 40, type: 'white.elixir' },
|
||||||
|
{ startIndex: 41, type: 'identifier.elixir' },
|
||||||
|
{ startIndex: 45, type: 'operator.elixir' },
|
||||||
|
{ startIndex: 47, type: 'identifier.elixir' },
|
||||||
|
{ startIndex: 53, type: 'delimiter.angle.special.elixir' }
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
// Keyword list shorthand
|
// Keyword list shorthand
|
||||||
|
|
||||||
keywordsShorthand: [
|
keywordsShorthand: [
|
||||||
[/(@atomName)(:)/, ['constant', 'constant.punctuation']],
|
[/(@atomName)(:)(\s+)/, ['constant', 'constant.punctuation', 'white']],
|
||||||
// Use positive look-ahead to ensure the string is followed by :
|
// Use positive look-ahead to ensure the string is followed by :
|
||||||
// and should be considered a keyword.
|
// and should be considered a keyword.
|
||||||
[
|
[
|
||||||
|
|
@ -532,6 +532,13 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
next: '@doubleQuotedHeredocDocstring'
|
next: '@doubleQuotedHeredocDocstring'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
/\@(module|type)?doc (~[sS])?'''/,
|
||||||
|
{
|
||||||
|
token: 'comment.block.documentation',
|
||||||
|
next: '@singleQuotedHeredocDocstring'
|
||||||
|
}
|
||||||
|
],
|
||||||
[
|
[
|
||||||
/\@(module|type)?doc (~[sS])?"/,
|
/\@(module|type)?doc (~[sS])?"/,
|
||||||
{
|
{
|
||||||
|
|
@ -539,6 +546,13 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
next: '@doubleQuotedStringDocstring'
|
next: '@doubleQuotedStringDocstring'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
/\@(module|type)?doc (~[sS])?'/,
|
||||||
|
{
|
||||||
|
token: 'comment.block.documentation',
|
||||||
|
next: '@singleQuotedStringDocstring'
|
||||||
|
}
|
||||||
|
],
|
||||||
[/\@(module|type)?doc false/, 'comment.block.documentation'],
|
[/\@(module|type)?doc false/, 'comment.block.documentation'],
|
||||||
// Module attributes
|
// Module attributes
|
||||||
[/\@(@variableName)/, 'variable']
|
[/\@(@variableName)/, 'variable']
|
||||||
|
|
@ -549,11 +563,21 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
{ include: '@docstringContent' }
|
{ include: '@docstringContent' }
|
||||||
],
|
],
|
||||||
|
|
||||||
|
singleQuotedHeredocDocstring: [
|
||||||
|
[/'''/, { token: 'comment.block.documentation', next: '@pop' }],
|
||||||
|
{ include: '@docstringContent' }
|
||||||
|
],
|
||||||
|
|
||||||
doubleQuotedStringDocstring: [
|
doubleQuotedStringDocstring: [
|
||||||
[/"/, { token: 'comment.block.documentation', next: '@pop' }],
|
[/"/, { token: 'comment.block.documentation', next: '@pop' }],
|
||||||
{ include: '@docstringContent' }
|
{ include: '@docstringContent' }
|
||||||
],
|
],
|
||||||
|
|
||||||
|
singleQuotedStringDocstring: [
|
||||||
|
[/'/, { token: 'comment.block.documentation', next: '@pop' }],
|
||||||
|
{ include: '@docstringContent' }
|
||||||
|
],
|
||||||
|
|
||||||
// Operators, punctuation, brackets
|
// Operators, punctuation, brackets
|
||||||
|
|
||||||
symbols: [
|
symbols: [
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ global.self = global;
|
||||||
global.document.queryCommandSupported = function () {
|
global.document.queryCommandSupported = function () {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
global.UIEvent = tmp.window.UIEvent;
|
||||||
|
|
||||||
global.window = {
|
global.window = {
|
||||||
location: {},
|
location: {},
|
||||||
|
|
|
||||||
|
|
@ -34,27 +34,27 @@ monaco.languages.registerColorProvider('colorLanguage', {
|
||||||
color: { red: 1, blue: 0, green: 0, alpha: 1 },
|
color: { red: 1, blue: 0, green: 0, alpha: 1 },
|
||||||
range: {
|
range: {
|
||||||
startLineNumber: 1,
|
startLineNumber: 1,
|
||||||
startColumn: 0,
|
startColumn: 1,
|
||||||
endLineNumber: 1,
|
endLineNumber: 1,
|
||||||
endColumn: 0
|
endColumn: 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: { red: 0, blue: 1, green: 0, alpha: 1 },
|
color: { red: 0, blue: 1, green: 0, alpha: 1 },
|
||||||
range: {
|
range: {
|
||||||
startLineNumber: 2,
|
startLineNumber: 2,
|
||||||
startColumn: 0,
|
startColumn: 1,
|
||||||
endLineNumber: 2,
|
endLineNumber: 2,
|
||||||
endColumn: 0
|
endColumn: 5
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: { red: 0, blue: 0, green: 1, alpha: 1 },
|
color: { red: 0, blue: 0, green: 1, alpha: 1 },
|
||||||
range: {
|
range: {
|
||||||
startLineNumber: 3,
|
startLineNumber: 3,
|
||||||
startColumn: 0,
|
startColumn: 1,
|
||||||
endLineNumber: 3,
|
endLineNumber: 3,
|
||||||
endColumn: 0
|
endColumn: 6
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue