Real position of last error should be initialized to an impossible value.
This commit is contained in:
Nick Guerrera 2021-04-20 09:18:07 -07:00 коммит произвёл GitHub
Родитель a6d9bc552c
Коммит 223ecb6a7a
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -110,7 +110,7 @@ namespace ListKind {
export function parse(code: string | Types.SourceFile) {
let previousTokenEnd = -1;
let realPositionOfLastError = 1;
let realPositionOfLastError = -1;
let missingIdentifierCounter = 0;
const parseDiagnostics: Types.Diagnostic[] = [];
const scanner = createScanner(code, reportDiagnostic);