declared_name.h 720 B

1234567891011121314151617181920212223242526
  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_SEMANTICS_NODES_DECLARED_NAME_H_
  5. #define CARBON_TOOLCHAIN_SEMANTICS_NODES_DECLARED_NAME_H_
  6. #include "common/ostream.h"
  7. #include "toolchain/parser/parse_tree.h"
  8. namespace Carbon::Semantics {
  9. // Represents a name.
  10. class DeclaredName {
  11. public:
  12. explicit DeclaredName(ParseTree::Node node) : node_(node) {}
  13. auto node() const -> ParseTree::Node { return node_; }
  14. private:
  15. ParseTree::Node node_;
  16. };
  17. } // namespace Carbon::Semantics
  18. #endif // CARBON_TOOLCHAIN_SEMANTICS_NODES_DECLARED_NAME_H_