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

Рефакторинг подсказки по типам

This commit is contained in:
salexdv 2022-03-23 12:07:15 +03:00
parent 0b958a3b04
commit 9bc56367c0

View File

@ -193,6 +193,18 @@ class bslHelper {
}
/**
* Determines if the last expression has separated params
*
* @returns {bool}
*/
lastExpressionHasSeparatedParams() {
let expArray = this.getExpressioArray();
return (expArray.length && 0 <= expArray.pop().indexOf(','))
}
/**
* Find first string which has no pair braces
* @param {string} str string for analisis
@ -718,9 +730,8 @@ class bslHelper {
let exp = this.getFuncName();
if (exp == 'typedescription' || exp == 'описаниетипов') {
let array = this.getExpressioArray();
return (array.length && array[array.length - 1].indexOf(',') == -1)
if (exp == 'typedescription' || exp == 'описаниетипов') {
return !this.lastExpressionHasSeparatedParams();
}
else
return (exp == 'type' || exp == 'тип');