Spicy
void.h
1 // Copyright (c) 2020-2021 by the Zeek Project. See LICENSE for details.
2 
3 #pragma once
4 
5 #include <utility>
6 
7 #include <hilti/ast/type.h>
8 
9 namespace hilti::type {
10 
12 class Void : public TypeBase {
13 public:
14  bool operator==(const Void& /* other */) const { return true; }
15 
16  // Type interface.
17  auto isEqual(const Type& other) const { return node::isEqual(this, other); }
19  auto _isResolved(ResolvedState* rstate) const { return true; }
20 
22  auto properties() const { return node::Properties{}; }
23 
28  static Void create(Meta m = Meta()) { return Void(std::move(m)); }
29 
30 private:
31  Void(Meta m = Meta()) : TypeBase(std::move(m)) {}
32 };
33 
35 static const Type void_ = Void::create(Location("<singleton>"));
36 } // namespace hilti::type
Definition: void.h:12
static Void create(Meta m=Meta())
Definition: void.h:28
Definition: meta.h:19
Definition: type.h:158
std::map< std::string, node::detail::PropertyValue > Properties
Definition: node.h:97
Definition: type.h:197
Definition: location.h:18
auto _isResolved(ResolvedState *rstate) const
Definition: void.h:19
Definition: type.h:25
auto properties() const
Definition: void.h:22