2020-02-25 23:11:52 +08:00
|
|
|
//===-- lib/Semantics/resolve-labels.h --------------------------*- C++ -*-===//
|
2018-08-21 07:47:18 +08:00
|
|
|
//
|
2019-12-21 04:52:07 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2018-08-21 07:47:18 +08:00
|
|
|
//
|
2020-01-11 04:12:03 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2018-08-21 07:47:18 +08:00
|
|
|
|
|
|
|
#ifndef FORTRAN_SEMANTICS_RESOLVE_LABELS_H_
|
|
|
|
#define FORTRAN_SEMANTICS_RESOLVE_LABELS_H_
|
|
|
|
|
2018-09-01 01:26:19 +08:00
|
|
|
namespace Fortran::parser {
|
2018-08-21 07:47:18 +08:00
|
|
|
struct Program;
|
2018-10-25 20:55:23 +08:00
|
|
|
}
|
2018-08-21 07:47:18 +08:00
|
|
|
|
2018-09-01 01:26:19 +08:00
|
|
|
namespace Fortran::semantics {
|
2019-07-10 02:54:40 +08:00
|
|
|
class SemanticsContext;
|
2018-08-21 07:47:18 +08:00
|
|
|
|
|
|
|
/// \brief Validate the labels in the program
|
2019-07-10 02:54:40 +08:00
|
|
|
/// \param context semantic context for errors
|
2018-09-15 06:04:50 +08:00
|
|
|
/// \param program the parse tree of the program
|
2018-08-21 07:47:18 +08:00
|
|
|
/// \return true, iff the program's labels pass semantics checks
|
2019-07-10 02:54:40 +08:00
|
|
|
bool ValidateLabels(SemanticsContext &context, const parser::Program &program);
|
2020-03-29 12:00:16 +08:00
|
|
|
} // namespace Fortran::semantics
|
|
|
|
#endif // FORTRAN_SEMANTICS_RESOLVE_LABELS_H_
|