1
0
mirror of https://github.com/salexdv/bsl_console.git synced 2024-11-28 08:48:48 +02:00

Парсинг общих модулей: только экспортные +многострочные

This commit is contained in:
Alexander Shkuraev 2021-08-18 17:06:47 +03:00
parent 8cbd6537db
commit 9bd55ad162

View File

@ -4340,8 +4340,9 @@ class bslHelper {
static parseCommonModule(moduleName, moduleText) {
let model = monaco.editor.createModel(moduleText);
let matches = model.findMatches('(?:процедура|функция|procedure|function)\\s+([a-zA-Z0-9\u0410-\u044F_]+)\\(([a-zA-Z0-9\u0410-\u044F_,\\s=]+)\\)', true, true, false, null, true);
const model = monaco.editor.createModel(moduleText);
const pattern = '(?:процедура|функция|procedure|function)\\s+([a-zA-Z0-9\u0410-\u044F_]+)\\(([a-zA-Z0-9\u0410-\u044F_,\\s\\n="]+)\\)\\s+(?:экспорт|export)';
const matches = model.findMatches(pattern, true, true, false, null, true);
if (matches && matches.length) {