提交 1fbaf0ca 编写于 作者: P Phillip Carter 提交者: Don Syme

Fix error logging in brace matching code (#4140)

* Remove error logger pushing code

* Update service.fs
上级 f9893b6a
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册