resolve_control_flow.h 765 B

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