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::type {
14 
16 class UnresolvedID : public TypeBase {
17 public:
18  UnresolvedID(::hilti::ID id, Meta m = Meta()) : TypeBase({std::move(id)}, std::move(m)) {}
19 
20  const auto& id() const { return child<::hilti::ID>(0); }
21 
22  bool operator==(const UnresolvedID& other) const { return id() == other.id(); }
23 
24  // Type interface.
25  auto isEqual(const Type& other) const { return node::isEqual(this, other); }
27  auto _isResolved(ResolvedState* rstate) const { return false; }
28 
29  // Node interface.
30  auto properties() const { return node::Properties{}; }
31 };
32 
33 } // namespace hilti::type
Definition: unresolved-id.h:16
Definition: meta.h:19
Definition: type.h:160
auto _isResolved(ResolvedState *rstate) const
Definition: unresolved-id.h:27
std::map< std::string, node::detail::PropertyValue > Properties
Definition: node.h:97
Definition: type.h:206
Definition: type.h:26
Definition: id.h:18