This commit is contained in:
Luis G 2018-06-27 02:56:23 -03:00 коммит произвёл Vlad Barosan
Родитель 309362ba7a
Коммит 15a7a02c10
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -107,7 +107,7 @@ export class GoSignatureHelpProvider implements SignatureHelpProvider {
// This is needed to detect string literals and ignore commas within them
let doubleQuoteIndexes = new IndexRangeArray();
let singleQuoteIndexes = new IndexRangeArray();
let specialQuoteIndexes = new IndexRangeArray();
let backtickQuoteIndexes = new IndexRangeArray();
for (let i = 0; i < currentLine.length; i++) {
// Ignore escaped quotes, only count string literal boundaries
if ((i > 0) && (currentLine[i - 1] !== '\\')) {
@ -119,7 +119,7 @@ export class GoSignatureHelpProvider implements SignatureHelpProvider {
doubleQuoteIndexes.PushIndex(i);
break;
case '`':
specialQuoteIndexes.PushIndex(i);
backtickQuoteIndexes.PushIndex(i);
break;
}
}
@ -143,7 +143,7 @@ export class GoSignatureHelpProvider implements SignatureHelpProvider {
let pushComma = (parenBalance === 0)
&& !doubleQuoteIndexes.IsWithinPairRange(char)
&& !singleQuoteIndexes.IsWithinPairRange(char)
&& !specialQuoteIndexes.IsWithinPairRange(char);
&& !backtickQuoteIndexes.IsWithinPairRange(char);
if (pushComma) {
commas.push(new Position(line, char));
}
@ -153,7 +153,6 @@ export class GoSignatureHelpProvider implements SignatureHelpProvider {
}
return null;
}
}
class IndexRangeArray {