Spicy
unresolved-id.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/declaration.h>
8 #include <hilti/ast/declarations/type.h>
9 #include <hilti/ast/id.h>
10 #include <hilti/ast/node-ref.h>
11 #include <hilti/ast/type.h>
12 
13 namespace hilti {
14 namespace type {
15 
17 class UnresolvedID : public TypeBase {
18 public:
19  UnresolvedID(::hilti::ID id, Meta m = Meta()) : TypeBase({std::move(id)}, std::move(m)) {}
20 
21  const auto& id() const { return child<::hilti::ID>(0); }
22 
23  bool operator==(const UnresolvedID& other) const { return id() == other.id(); }
24 
25  // Type interface.
26  auto isEqual(const Type& other) const { return node::isEqual(this, other); }
28  auto _isResolved(ResolvedState* rstate) const { return false; }
29 
30  // Node interface.
31  auto properties() const { return node::Properties{}; }
32 };
33 
34 } // namespace type
35 } // namespace hilti
Definition: unresolved-id.h:17
Definition: meta.h:18
Definition: type.h:159
auto _isResolved(ResolvedState *rstate) const
Definition: unresolved-id.h:28
std::map< std::string, node::detail::PropertyValue > Properties
Definition: node.h:99
Definition: type.h:198
Definition: id.h:18