41 std::unordered_map<NodeId, CallProps> call_props_;
42 std::unordered_map<NodeId, VariableProps> variable_props_;
43 std::unordered_map<NodeId, BinaryProps> binary_props_;
44 std::unordered_map<NodeId, TypeAliasProps> type_alias_props_;
45 std::unordered_map<NodeId, TypeClassInstanceProps> type_class_instance_props_;
46 std::unordered_map<NodeId, Type> node_types_;
50 CallProps &call(NodeId
id) {
return call_props_[id]; }
51 VariableProps &variable(NodeId
id) {
return variable_props_[id]; }
52 BinaryProps &binary(NodeId
id) {
return binary_props_[id]; }
53 TypeAliasProps &type_alias(NodeId
id) {
return type_alias_props_[id]; }
55 return type_class_instance_props_[id];
60 auto it = call_props_.find(
id);
61 return it != call_props_.end() ? &it->second :
nullptr;
64 auto it = variable_props_.find(
id);
65 return it != variable_props_.end() ? &it->second :
nullptr;
68 auto it = binary_props_.find(
id);
69 return it != binary_props_.end() ? &it->second :
nullptr;
72 auto it = type_alias_props_.find(
id);
73 return it != type_alias_props_.end() ? &it->second :
nullptr;
76 auto it = type_class_instance_props_.find(
id);
77 return it != type_class_instance_props_.end() ? &it->second :
nullptr;
81 void set_type(NodeId
id,
const Type &t) { node_types_[id] = t; }
82 Type get_type(NodeId
id)
const {
83 auto it = node_types_.find(
id);
84 return it != node_types_.end() ? it->second : Type::NonExistent();
86 bool has_type(NodeId
id)
const {
return node_types_.contains(
id); }