parse_and_execute.h 912 B

12345678910111213141516171819202122
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #ifndef CARBON_EXPLORER_PARSE_AND_EXECUTE_PARSE_AND_EXECUTE_H_
  5. #define CARBON_EXPLORER_PARSE_AND_EXECUTE_PARSE_AND_EXECUTE_H_
  6. #include "common/error.h"
  7. #include "explorer/base/trace_stream.h"
  8. #include "llvm/Support/VirtualFileSystem.h"
  9. namespace Carbon {
  10. // Parses and executes the input file, returning the program result on success.
  11. auto ParseAndExecute(llvm::vfs::FileSystem& fs, std::string_view prelude_path,
  12. std::string_view input_file_name, bool parser_debug,
  13. Nonnull<TraceStream*> trace_stream,
  14. Nonnull<llvm::raw_ostream*> print_stream) -> ErrorOr<int>;
  15. } // namespace Carbon
  16. #endif // CARBON_EXPLORER_PARSE_AND_EXECUTE_PARSE_AND_EXECUTE_H_