4f05562e0c
This commit introduces the `CompilationResult` struct to encapsulate the outcome of a compilation pass. It holds either a successfully compiled `TypedNode` or a `Diagnostics` object containing errors. Helper methods for creating success or error results and for converting to a `Result` are also included. This improves error handling and clarity in the compilation process.