Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/fsharp/service/service.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,12 @@ module internal Parser =

let matchBraces(source, fileName, options: FSharpParsingOptions, userOpName: string) =
Trace.TraceInformation("FCS: {0}.{1} ({2})", userOpName, "matchBraces", fileName)

// Make sure there is an ErrorLogger installed whenever we do stuff that might record errors, even if we ultimately ignore the errors
let delayedLogger = CapturingErrorLogger("matchBraces")
use _unwindEL = PushErrorLoggerPhaseUntilUnwind (fun _ -> delayedLogger)
use _unwindBP = PushThreadBuildPhaseUntilUnwind BuildPhase.Parse

let matchingBraces = new ResizeArray<_>()
Lexhelp.usingLexbufForParsing(UnicodeLexing.StringAsLexbuf(addNewLine source), fileName) (fun lexbuf ->
let errHandler = ErrorHandler(false, fileName, options.ErrorSeverityOptions, source)
Expand Down