semantics.h 697 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 TOOLCHAIN_SEMANTICS_SEMANTICS_H_
  5. #define TOOLCHAIN_SEMANTICS_SEMANTICS_H_
  6. #include "toolchain/parser/parse_tree.h"
  7. namespace Carbon {
  8. // Provides semantic analysis on a ParseTree.
  9. class Semantics {
  10. public:
  11. // Analyzes a parse tree and returns the constructed semantic information.
  12. static auto Analyze(const ParseTree& parse_tree, DiagnosticConsumer& consumer)
  13. -> Semantics;
  14. private:
  15. Semantics() = default;
  16. };
  17. } // namespace Carbon
  18. #endif // TOOLCHAIN_SEMANTICS_SEMANTICS_H_