prelude.h 821 B

12345678910111213141516171819202122232425
  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_SYNTAX_PRELUDE_H_
  5. #define CARBON_EXPLORER_SYNTAX_PRELUDE_H_
  6. #include <string_view>
  7. #include "explorer/ast/declaration.h"
  8. #include "explorer/base/arena.h"
  9. #include "explorer/base/nonnull.h"
  10. #include "llvm/Support/VirtualFileSystem.h"
  11. namespace Carbon {
  12. // Adds the Carbon prelude to `declarations`.
  13. void AddPrelude(llvm::vfs::FileSystem& fs, std::string_view prelude_file_name,
  14. Nonnull<Arena*> arena,
  15. std::vector<Nonnull<Declaration*>>* declarations,
  16. int* num_prelude_declarations);
  17. } // namespace Carbon
  18. #endif // CARBON_EXPLORER_SYNTAX_PRELUDE_H_