parse.h 773 B

1234567891011121314151617181920212223
  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_TOOLCHAIN_PARSE_PARSE_H_
  5. #define CARBON_TOOLCHAIN_PARSE_PARSE_H_
  6. #include "common/ostream.h"
  7. #include "toolchain/diagnostics/diagnostic_emitter.h"
  8. #include "toolchain/lex/tokenized_buffer.h"
  9. #include "toolchain/parse/tree.h"
  10. namespace Carbon::Parse {
  11. // Parses the token buffer into a `Tree`.
  12. //
  13. // This is the factory function which is used to build parse trees.
  14. auto Parse(Lex::TokenizedBuffer& tokens, DiagnosticConsumer& consumer,
  15. llvm::raw_ostream* vlog_stream) -> Tree;
  16. } // namespace Carbon::Parse
  17. #endif // CARBON_TOOLCHAIN_PARSE_PARSE_H_