forked from nixel2007/vsc-language-1c-bsl
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
635 additions
and
1,404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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а-яё]+)" | ||
} | ||
] | ||
} |
Oops, something went wrong.