Remove RuntimeError / CompilationError. (#2258)

Instead, work out the prefix for an error based on whether it was produced during parsing, semantic analysis, or when running the program.
This commit is contained in:
Richard Smith
2022-10-04 15:39:04 -07:00
committed by GitHub
parent c703c89658
commit 8f0f69b65f
63 changed files with 254 additions and 264 deletions
+2
View File
@@ -83,6 +83,8 @@ auto ParseAndExecute(const Fuzzing::CompilationUnit& compilation_unit)
CARBON_CHECK(prelude_path.ok()) << prelude_path.error();
AddPrelude(*prelude_path, &arena, &ast.declarations);
CARBON_ASSIGN_OR_RETURN(
ast, AnalyzeProgram(&arena, ast, /*trace_stream=*/std::nullopt));
return ExecProgram(&arena, ast, /*trace_stream=*/std::nullopt);
}