var_decl.h 768 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 MIGRATE_CPP_CPP_REFACTORING_VAR_DECL_H_
  5. #define MIGRATE_CPP_CPP_REFACTORING_VAR_DECL_H_
  6. #include "migrate_cpp/cpp_refactoring/matcher.h"
  7. namespace Carbon {
  8. // Updates variable declarations for `var name: Type`.
  9. class VarDecl : public Matcher {
  10. public:
  11. explicit VarDecl(std::map<std::string, Replacements>& in_replacements,
  12. MatchFinder* finder);
  13. void run(const MatchFinder::MatchResult& result) override;
  14. private:
  15. static constexpr char Label[] = "VarDecl";
  16. };
  17. } // namespace Carbon
  18. #endif // MIGRATE_CPP_CPP_REFACTORING_VAR_DECL_H_