TypeCobol
TypeCobol copied to clipboard
IndexOutOfRangeException in Scanner.GetTokenStartingFrom
Describe the bug Same as in #2550 but the stacktrace is different.
Stacktrace
à TypeCobol.Compiler.Scanner.Scanner.GetTokenStartingFrom(Int32 startIndex)
à TypeCobol.Compiler.Scanner.AbstractScanner.ScanWhitespace(Int32 startIndex)
à TypeCobol.Compiler.Scanner.Scanner.GetTokenStartingFrom(Int32 startIndex)
à TypeCobol.Compiler.Scanner.Scanner.ScanTokensLine(TokensLine tokensLine, MultilineScanState initialScanState, TypeCobolOptions compilerOptions, List`1 copyTextNameVariations, BitArray multiStringConcatBitPosition)
à TypeCobol.Compiler.Scanner.ScannerStep.ScanTokensLineWithContinuations(Int32 lineToScanIndex, TokensLine lineToScan, TextSourceInfo textSourceInfo, ISearchableReadOnlyList`1 documentLines, PrepareDocumentLineForUpdate prepareDocumentLineForUpdate, TypeCobolOptions compilerOptions, List`1 copyTextNameVariations, IList`1 tokensLinesChanges, MultilineScanState scanState, Int32& nextLineToScanIndex, TokensLine& nextLineToScan)
à TypeCobol.Compiler.Scanner.ScannerStep.ScanTokensLineWithMultilineScanState(Int32 lineToScanIndex, TokensLine lineToScan, TextSourceInfo textSourceInfo, ISearchableReadOnlyList`1 documentLines, PrepareDocumentLineForUpdate prepareDocumentLineForUpdate, TypeCobolOptions compilerOptions, List`1 copyTextNameVariations, IList`1 tokensLinesChanges, MultilineScanState scanState, Int32& nextLineToScanIndex, TokensLine& nextLineToScan)
à TypeCobol.Compiler.Scanner.ScannerStep.ScanTextLinesChanges(TextSourceInfo textSourceInfo, ISearchableReadOnlyList`1 documentLines, IList`1 textLinesChanges, PrepareDocumentLineForUpdate prepareDocumentLineForUpdate, TypeCobolOptions compilerOptions, List`1 copyTextNameVariations, MultilineScanState scanState)
à TypeCobol.Compiler.CompilationDocument.UpdateTokensLines(Action onVersion)
à TypeCobol.Compiler.FileCompiler.CompileOnce(Nullable`1 exec2Step, Boolean haltOnMissingCopy)
à TypeCobol.LanguageServer.Workspace.UpdateSourceFile(Uri fileUri, RangeUpdate[] updates)
à TypeCobol.LanguageServer.TypeCobolServer.OnDidChangeTextDocument(DidChangeTextDocumentParams parameters)
à TypeCobol.LanguageServer.VsCodeProtocol.LanguageServer.CallDidChangeTextDocument(NotificationType notificationType, Object parameters, LSPProfiling lspProfiling)
To Reproduce TODO
Expected behavior No exception
Technical
How to test automatically Standard test