mirror of
https://github.com/salexdv/bsl_console.git
synced 2025-02-21 19:19:40 +02:00
Merge branch 'salexdv:develop' into develop
This commit is contained in:
commit
230701be6b
@ -67,6 +67,7 @@
|
|||||||
| `removeWordWrap` | Удаляет перенос строки у текущего блока |
|
| `removeWordWrap` | Удаляет перенос строки у текущего блока |
|
||||||
| [`insertLine`](docs/insert_line.md) | Вставляет текст в строку с указанным номером |
|
| [`insertLine`](docs/insert_line.md) | Вставляет текст в строку с указанным номером |
|
||||||
| [`addLine`](docs/add_line.md) | Добавляет новую строку с указанным текстом |
|
| [`addLine`](docs/add_line.md) | Добавляет новую строку с указанным текстом |
|
||||||
|
| `deleteLine` | Удаляет строки с указанным номером |
|
||||||
| [`getPositionOffset`](docs/get_position_offset.md) | Возвращает координаты текущей позиции курсора |
|
| [`getPositionOffset`](docs/get_position_offset.md) | Возвращает координаты текущей позиции курсора |
|
||||||
| `jumpToBracket` | Переход к парной скобке `CTRL+[]` |
|
| `jumpToBracket` | Переход к парной скобке `CTRL+[]` |
|
||||||
| `selectToBracket` | Выделяет скобки и текст между ними `SHIFT+ALT+B` |
|
| `selectToBracket` | Выделяет скобки и текст между ними `SHIFT+ALT+B` |
|
||||||
|
@ -5723,7 +5723,8 @@ define([], function () {
|
|||||||
"И": {},
|
"И": {},
|
||||||
"ИЛИ": {},
|
"ИЛИ": {},
|
||||||
"NULL": {},
|
"NULL": {},
|
||||||
"Новый": {}
|
"Новый": {},
|
||||||
|
"Перейти": {}
|
||||||
},
|
},
|
||||||
"en": {
|
"en": {
|
||||||
"Procedure": {},
|
"Procedure": {},
|
||||||
@ -5763,7 +5764,8 @@ define([], function () {
|
|||||||
"NOT": {},
|
"NOT": {},
|
||||||
"AND": {},
|
"AND": {},
|
||||||
"OR": {},
|
"OR": {},
|
||||||
"New": {}
|
"New": {},
|
||||||
|
"Goto": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"classes": {
|
"classes": {
|
||||||
|
@ -3495,8 +3495,8 @@ class bslHelper {
|
|||||||
getLoopsVarNames(currentLine) {
|
getLoopsVarNames(currentLine) {
|
||||||
|
|
||||||
let names = [];
|
let names = [];
|
||||||
let each_pattern = '(?:для каждого|for each)\\s+([a-zA-Z0-9\u0410-\u044F_,\\s=]+)\\s+(?:из|in)';
|
let each_pattern = '(?:для каждого|for each)\\s+([a-zA-Z0-9\u0410-\u044F_,\\s=]+?)\\s+(?:из|in)';
|
||||||
let for_pattern = '(?:для|for)\\s+([a-zA-Z0-9\u0410-\u044F_,\\s=]+)\\s+=.*(?:по|to)';
|
let for_pattern = '(?:для|for)\\s+([a-zA-Z0-9\u0410-\u044F_,\\s=]+?)\\s+=.*(?:по|to)';
|
||||||
|
|
||||||
if (currentLine == 0) {
|
if (currentLine == 0) {
|
||||||
|
|
||||||
|
@ -57,7 +57,8 @@ define([], function () {
|
|||||||
{ token: 'string.invalidbsl', foreground: '000000' },
|
{ token: 'string.invalidbsl', foreground: '000000' },
|
||||||
{ token: 'numberbsl', foreground: '000000' },
|
{ token: 'numberbsl', foreground: '000000' },
|
||||||
{ token: 'number.floatbsl', foreground: '000000' },
|
{ token: 'number.floatbsl', foreground: '000000' },
|
||||||
{ token: 'preprocbsl', foreground: '963200' }
|
{ token: 'preprocbsl', foreground: '963200' },
|
||||||
|
{ token: 'gotomarkbsl', foreground: '3a3a3a' }
|
||||||
],
|
],
|
||||||
whiteQueryOn: [
|
whiteQueryOn: [
|
||||||
{ token: 'querybsl', foreground: '000000' },
|
{ token: 'querybsl', foreground: '000000' },
|
||||||
@ -85,7 +86,8 @@ define([], function () {
|
|||||||
{ token: 'string.invalidbsl', foreground: 'c3602c' },
|
{ token: 'string.invalidbsl', foreground: 'c3602c' },
|
||||||
{ token: 'numberbsl', foreground: 'b5cea8' },
|
{ token: 'numberbsl', foreground: 'b5cea8' },
|
||||||
{ token: 'number.floatbsl', foreground: 'b5cea8' },
|
{ token: 'number.floatbsl', foreground: 'b5cea8' },
|
||||||
{ token: 'preprocbsl', foreground: '963200' }
|
{ token: 'preprocbsl', foreground: '963200' },
|
||||||
|
{ token: 'gotomarkbsl', foreground: 'ff9000' }
|
||||||
],
|
],
|
||||||
darkQueryOff: [
|
darkQueryOff: [
|
||||||
{ token: 'querybsl', foreground: 'c3602c' },
|
{ token: 'querybsl', foreground: 'c3602c' },
|
||||||
@ -163,7 +165,7 @@ define([], function () {
|
|||||||
'New', 'Процедура', 'Procedure', 'Функция', 'Function', 'Перем', 'Var',
|
'New', 'Процедура', 'Procedure', 'Функция', 'Function', 'Перем', 'Var',
|
||||||
'Экспорт', 'Export', 'Знач', 'Val', 'Неопределено', 'Выполнить',
|
'Экспорт', 'Export', 'Знач', 'Val', 'Неопределено', 'Выполнить',
|
||||||
'Истина', 'Ложь', 'True', 'False', 'Undefined', 'Асинх', 'Async',
|
'Истина', 'Ложь', 'True', 'False', 'Undefined', 'Асинх', 'Async',
|
||||||
'Ждать', 'Await', 'Null'
|
'Ждать', 'Await', 'Null', 'Перейти', 'Goto'
|
||||||
],
|
],
|
||||||
namespaceFollows: [
|
namespaceFollows: [
|
||||||
'namespace', 'using',
|
'namespace', 'using',
|
||||||
@ -249,9 +251,10 @@ define([], function () {
|
|||||||
expBeforeAs: [
|
expBeforeAs: [
|
||||||
'КОНЕЦ', 'END', 'NULL', 'НЕОПРЕДЕЛЕНО', 'UNDEFINED'
|
'КОНЕЦ', 'END', 'NULL', 'НЕОПРЕДЕЛЕНО', 'UNDEFINED'
|
||||||
],
|
],
|
||||||
// The main tokenizer for our languages
|
|
||||||
tokenizer: {
|
tokenizer: {
|
||||||
root: [
|
root: [
|
||||||
|
[/(перейти|goto)(\s+)(~[a-zA-Z\u0410-\u044F_0-9]*)/, ['keyword', '', 'gotomark']],
|
||||||
|
[/(~[a-zA-Z\u0410-\u044F_0-9]*)(:)/, ['gotomark', 'delimiter']],
|
||||||
[/(\.)(выполнить)(\(?)/, ['delimiter', 'identifier', 'delimiter.parenthesis']],
|
[/(\.)(выполнить)(\(?)/, ['delimiter', 'identifier', 'delimiter.parenthesis']],
|
||||||
[/[a-zA-Z\u0410-\u044F_][a-zA-Z\u0410-\u044F_0-9]*/, { cases: { '@keywords': 'keyword', '@default': 'identifier' } }],
|
[/[a-zA-Z\u0410-\u044F_][a-zA-Z\u0410-\u044F_0-9]*/, { cases: { '@keywords': 'keyword', '@default': 'identifier' } }],
|
||||||
// whitespace
|
// whitespace
|
||||||
|
@ -599,6 +599,15 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deleteLine = function(lineNumber) {
|
||||||
|
|
||||||
|
editor.executeEdits('addLine', [{
|
||||||
|
range: new monaco.Range(lineNumber, 1, lineNumber + 1, 1),
|
||||||
|
text: null
|
||||||
|
}]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
getPositionOffset = function() {
|
getPositionOffset = function() {
|
||||||
|
|
||||||
let position = editor.getPosition();
|
let position = editor.getPosition();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user