mirror of
https://github.com/salexdv/bsl_console.git
synced 2024-11-24 08:33:29 +02:00
Объединение шаблонов кода
This commit is contained in:
parent
dd0b5066b0
commit
33a846236a
@ -1259,7 +1259,7 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
|
||||
|
||||
}
|
||||
|
||||
parseSnippets = function(stData) {
|
||||
parseSnippets = function(stData, unionSnippets = false) {
|
||||
|
||||
let parser = new SnippetsParser();
|
||||
parser.setStream(stData);
|
||||
@ -1267,11 +1267,19 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
|
||||
let loaded_snippets = parser.getSnippets();
|
||||
|
||||
if (loaded_snippets) {
|
||||
snippets = loaded_snippets;
|
||||
|
||||
let snip_obj = loaded_snippets;
|
||||
|
||||
if (unionSnippets)
|
||||
snippets = Object.assign(snippets, snip_obj);
|
||||
else
|
||||
snippets = snip_obj;
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user