slang::ast::Compilation::DiagnosticCapture class

Captures diagnostics issued while it is alive instead of adding them to the compilation's main diagnostic set.

Useful for getting diagnostics from operations on an already-elaborated compilation, such as binding an expression in a REPL. Captures can be nested.

Public functions

Diagnostics finish()
Returns the captured diagnostics and stops capturing.