Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nixel2007 committed Nov 5, 2024
2 parents bf4b919 + 0204d3f commit cc5cd98
Show file tree
Hide file tree
Showing 7 changed files with 635 additions and 1,404 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.28.0

* Грамматики переведены в формат JSON
* Убрана горячая клавиша с команды expandAbbreviation как мешающая плагинам AI-автокомплита

## 1.27.3

* Обновлены правила подсветки языка запросов и языка 1С
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Language 1C (BSL)",
"description": "Syntax highlighting for 1C:Enterprise 8.",
"icon": "images/1c-syntax.png",
"version": "1.27.3",
"version": "1.28.0",
"publisher": "1c-syntax",
"galleryBanner": {
"color": "#0000FF",
Expand Down Expand Up @@ -285,8 +285,6 @@
},
{
"command": "language-1c-bsl.expandAbbreviation",
"key": "tab",
"mac": "tab",
"when": "editorTextFocus && editorLangId == 'bsl'"
},
{
Expand Down Expand Up @@ -325,12 +323,12 @@
{
"language": "bsl",
"scopeName": "source.bsl",
"path": "./syntaxes/1c.tmLanguage"
"path": "./syntaxes/1c.tmLanguage.json"
},
{
"language": "sdbl",
"scopeName": "source.sdbl",
"path": "./syntaxes/1c-query.tmLanguage"
"path": "./syntaxes/1c-query.tmLanguage.json"
}
],
"problemMatchers": [
Expand Down
167 changes: 0 additions & 167 deletions syntaxes/1c-query.tmLanguage

This file was deleted.

107 changes: 107 additions & 0 deletions syntaxes/1c-query.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"displayName": "1C (Query)",
"name": "sdbl",
"scopeName": "source.sdbl",
"fileTypes": [
"sdbl",
"query"
],
"firstLineMatch": "(?i)Выбрать|Select(\\s+Разрешенные|\\s+Allowed)?(\\s+Различные|\\s+Distinct)?(\\s+Первые|\\s+Top)?.*",
"uuid": "d94265d3-2270-4ff2-ba36-649fbb4160df",
"patterns": [
{
"name": "comment.line.double-slash.sdbl",
"match": "(^\\s*//.*$)"
},
{
"name": "comment.line.double-slash.sdbl",
"begin": "//",
"end": "$"
},
{
"name": "string.quoted.double.sdbl",
"begin": "\\\"",
"end": "\\\"(?![\\\"])",
"patterns": [
{
"name": "constant.character.escape.sdbl",
"match": "\\\"\\\""
},
{
"name": "comment.line.double-slash.sdbl",
"match": "(^\\s*//.*$)"
}
]
},
{
"name": "constant.language.sdbl",
"match": "(?i)(?<=[^\\wа-яё\\.]|^)(Неопределено|Undefined|Истина|True|Ложь|False|NULL)(?=[^\\wа-яё\\.]|$)"
},
{
"name": "constant.numeric.sdbl",
"match": "(?<=[^\\wа-яё\\.]|^)(\\d+\\.?\\d*)(?=[^\\wа-яё\\.]|$)"
},
{
"name": "keyword.control.conditional.sdbl",
"match": "(?i)(?<=[^\\wа-яё\\.]|^)(Выбор|Case|Когда|When|Тогда|Then|Иначе|Else|Конец|End)(?=[^\\wа-яё\\.]|$)"
},
{
"name": "keyword.operator.logical.sdbl",
"match": "(?i)(?<!КАК\\s|AS\\s)(?<=[^\\wа-яё\\.]|^)(НЕ|NOT|И|AND|ИЛИ|OR|В\\s+ИЕРАРХИИ|IN\\s+HIERARCHY|В|In|Между|Between|Есть(\\s+НЕ)?\\s+NULL|Is(\\s+NOT)?\\s+NULL|Ссылка|Refs|Подобно|Like)(?=[^\\wа-яё\\.]|$)"
},
{
"name": "keyword.operator.comparison.sdbl",
"match": "<=|>=|=|<|>"
},
{
"name": "keyword.operator.arithmetic.sdbl",
"match": "(\\+|-|\\*|/|%)"
},
{
"name": "keyword.operator.sdbl",
"match": "(,|;)"
},
{
"name": "keyword.control.sdbl",
"match": "(?i)(?<=[^\\wа-яё\\.]|^)(Выбрать|Select|Разрешенные|Allowed|Различные|Distinct|Первые|Top|Как|As|ПустаяТаблица|EmptyTable|Поместить|Into|Уничтожить|Drop|Из|From|((Левое|Left|Правое|Right|Полное|Full)\\s+(Внешнее\\s+|Outer\\s+)?Соединение|Join)|((Внутреннее|Inner)\\s+Соединение|Join)|Где|Where|(Сгруппировать\\s+По(\\s+Группирующим\\s+Наборам)?)|(Group\\s+By(\\s+Grouping\\s+Set)?)|Имеющие|Having|Объединить(\\s+Все)?|Union(\\s+All)?|(Упорядочить\\s+По)|(Order\\s+By)|Автоупорядочивание|Autoorder|Итоги|Totals|По(\\s+Общие)?|By(\\s+Overall)?|(Только\\s+)?Иерархия|(Only\\s+)?Hierarchy|Периодами|Periods|Индексировать|Index|Выразить|Cast|Возр|Asc|Убыв|Desc|Для\\s+Изменения|(For\\s+Update(\\s+Of)?)|Спецсимвол|Escape|СгруппированоПо|GroupedBy)(?=[^\\wа-яё\\.]|$)"
},
{
"comment": "Функции языка запросов",
"name": "support.function.sdbl",
"match": "(?i)(?<=[^\\wа-яё\\.]|^)(Значение|Value|ДатаВремя|DateTime|Тип|Type)(?=\\()"
},
{
"comment": "Функции работы со строками",
"name": "support.function.sdbl",
"match": "(?i)(?<=[^\\wа-яё\\.]|^)(Подстрока|Substring|НРег|Lower|ВРег|Upper|Лев|Left|Прав|Right|ДлинаСтроки|StringLength|СтрНайти|StrFind|СтрЗаменить|StrReplace|СокрЛП|TrimAll|СокрЛ|TrimL|СокрП|TrimR)(?=\\()"
},
{
"comment": "Функции работы с датами",
"name": "support.function.sdbl",
"match": "(?i)(?<=[^\\wа-яё\\.]|^)(Год|Year|Квартал|Quarter|Месяц|Month|ДеньГода|DayOfYear|День|Day|Неделя|Week|ДеньНедели|Weekday|Час|Hour|Минута|Minute|Секунда|Second|НачалоПериода|BeginOfPeriod|КонецПериода|EndOfPeriod|ДобавитьКДате|DateAdd|РазностьДат|DateDiff|Полугодие|HalfYear|Декада|TenDays)(?=\\()"
},
{
"comment": "Функции работы с числами",
"name": "support.function.sdbl",
"match": "(?i)(?<=[^\\wа-яё\\.]|^)(ACOS|COS|ASIN|SIN|ATAN|TAN|EXP|POW|LOG|LOG10|Цел|Int|Окр|Round|SQRT)(?=\\()"
},
{
"comment": "Агрегатные функции",
"name": "support.function.sdbl",
"match": "(?i)(?<=[^\\wа-яё\\.]|^)(Сумма|Sum|Среднее|Avg|Минимум|Min|Максимум|Max|Количество|Count)(?=\\()"
},
{
"comment": "Прочие функции",
"name": "support.function.sdbl",
"match": "(?i)(?<=[^\\wа-яё\\.]|^)(ЕстьNULL|IsNULL|Представление|Presentation|ПредставлениеСсылки|RefPresentation|ТипЗначения|ValueType|АвтономерЗаписи|RecordAutoNumber|РазмерХранимыхДанных|StoredDataSize|УникальныйИдентификатор|UUID)(?=\\()"
},
{
"name": "support.type.sdbl",
"match": "(?i)(?<=[^\\wа-яё\\.])(Число|Number|Строка|String|Дата|Date|Булево|Boolean)(?=[^\\wа-яё\\.]|$)"
},
{
"name": "variable.parameter.sdbl",
"match": "(&[\\wа-яё]+)"
}
]
}
Loading

0 comments on commit cc5cd98

Please sign in to comment.