Spicy
doc-only.h
1 // Copyright (c) 2020-2021 by the Zeek Project. See LICENSE for details.
2 
3 #pragma once
4 
5 #include <string>
6 #include <utility>
7 
8 #include <hilti/ast/type.h>
9 
10 namespace hilti::type {
11 
18 class DocOnly : public TypeBase {
19 public:
20  DocOnly(std::string desc, Meta m = Meta()) : TypeBase(std::move(m)), _description(std::move(desc)) {}
21 
22  auto description() const { return _description; }
23 
24  bool operator==(const DocOnly& /* other */) const { return false; }
25 
26  // Type interface.
27  auto isEqual(const Type& other) const { return node::isEqual(this, other); }
29  auto _isResolved(ResolvedState* rstate) const { return true; }
31  auto properties() const { return node::Properties{}; }
32 
33 private:
34  std::string _description;
35 };
36 
37 } // namespace hilti::type
Definition: doc-only.h:18
Definition: meta.h:19
auto _isResolved(ResolvedState *rstate) const
Definition: doc-only.h:29
Definition: type.h:160
std::map< std::string, node::detail::PropertyValue > Properties
Definition: node.h:97
auto properties() const
Definition: doc-only.h:31
Definition: type.h:206
Definition: type.h:26