Spicy
null.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/ctor.h>
8 #include <hilti/ast/types/null.h>
9 
10 namespace hilti {
11 namespace ctor {
12 
14 class Null : public NodeBase, public hilti::trait::isCtor {
15 public:
16  Null(Meta m = Meta()) : NodeBase(std::move(m)) {}
17 
18  bool operator==(const Null& /* other */) const { return true; }
19 
21  auto type() const { return type::Null(); }
23  bool isConstant() const { return true; }
25  auto isLhs() const { return false; }
27  auto isTemporary() const { return true; }
29  auto isEqual(const Ctor& other) const { return node::isEqual(this, other); }
30 
32  auto properties() const { return node::Properties{}; }
33 };
34 
35 } // namespace ctor
36 } // namespace hilti
auto isEqual(const Ctor &other) const
Definition: null.h:29
auto type() const
Definition: null.h:21
Definition: meta.h:18
auto isLhs() const
Definition: null.h:25
Definition: null.h:14
bool isConstant() const
Definition: null.h:23
std::map< std::string, node::detail::PropertyValue > Properties
Definition: node.h:83
auto isTemporary() const
Definition: null.h:27
Definition: null.h:13
Definition: ctor.h:15
auto properties() const
Definition: null.h:32
Definition: node.h:318