resolve_control_flow.h 804 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_EXPLORER_INTERPRETER_RESOLVE_CONTROL_FLOW_H_
  5. #define CARBON_EXPLORER_INTERPRETER_RESOLVE_CONTROL_FLOW_H_
  6. #include "explorer/ast/ast.h"
  7. #include "explorer/base/nonnull.h"
  8. #include "explorer/base/trace_stream.h"
  9. namespace Carbon {
  10. // Resolves non-local control-flow edges, such as `break` and `return`, in the
  11. // given AST.
  12. // On failure, `ast` is left in a partial state and should not be further
  13. // processed.
  14. auto ResolveControlFlow(Nonnull<TraceStream*> trace_stream, AST& ast)
  15. -> ErrorOr<Success>;
  16. } // namespace Carbon
  17. #endif // CARBON_EXPLORER_INTERPRETER_RESOLVE_CONTROL_FLOW_H_