@@ -64,6 +64,7 @@ class ResolveStmt : public ResolverBase
64
64
65
65
resolver->get_name_scope ().insert (
66
66
path, constant.get_node_id (), constant.get_locus (), false ,
67
+ Rib::ItemType::Const,
67
68
[&] (const CanonicalPath &, NodeId, Location locus) -> void {
68
69
RichLocation r (constant.get_locus ());
69
70
r.add_range (locus);
@@ -82,7 +83,7 @@ class ResolveStmt : public ResolverBase
82
83
canonical_prefix);
83
84
}
84
85
85
- PatternDeclaration::go (stmt.get_pattern ().get ());
86
+ PatternDeclaration::go (stmt.get_pattern ().get (), Rib::ItemType::Var );
86
87
if (stmt.has_type ())
87
88
ResolveType::go (stmt.get_type ().get ());
88
89
}
@@ -97,6 +98,7 @@ class ResolveStmt : public ResolverBase
97
98
98
99
resolver->get_type_scope ().insert (
99
100
path, struct_decl.get_node_id (), struct_decl.get_locus (), false ,
101
+ Rib::ItemType::Type,
100
102
[&] (const CanonicalPath &, NodeId, Location locus) -> void {
101
103
RichLocation r (struct_decl.get_locus ());
102
104
r.add_range (locus);
@@ -128,6 +130,7 @@ class ResolveStmt : public ResolverBase
128
130
129
131
resolver->get_type_scope ().insert (
130
132
path, enum_decl.get_node_id (), enum_decl.get_locus (), false ,
133
+ Rib::ItemType::Type,
131
134
[&] (const CanonicalPath &, NodeId, Location locus) -> void {
132
135
RichLocation r (enum_decl.get_locus ());
133
136
r.add_range (locus);
@@ -158,7 +161,7 @@ class ResolveStmt : public ResolverBase
158
161
mappings->insert_canonical_path (item.get_node_id (), cpath);
159
162
160
163
resolver->get_type_scope ().insert (
161
- path, item.get_node_id (), item.get_locus (), false ,
164
+ path, item.get_node_id (), item.get_locus (), false , Rib::ItemType::Type,
162
165
[&] (const CanonicalPath &, NodeId, Location locus) -> void {
163
166
RichLocation r (item.get_locus ());
164
167
r.add_range (locus);
@@ -177,7 +180,7 @@ class ResolveStmt : public ResolverBase
177
180
mappings->insert_canonical_path (item.get_node_id (), cpath);
178
181
179
182
resolver->get_type_scope ().insert (
180
- path, item.get_node_id (), item.get_locus (), false ,
183
+ path, item.get_node_id (), item.get_locus (), false , Rib::ItemType::Type,
181
184
[&] (const CanonicalPath &, NodeId, Location locus) -> void {
182
185
RichLocation r (item.get_locus ());
183
186
r.add_range (locus);
@@ -202,7 +205,7 @@ class ResolveStmt : public ResolverBase
202
205
mappings->insert_canonical_path (item.get_node_id (), cpath);
203
206
204
207
resolver->get_type_scope ().insert (
205
- path, item.get_node_id (), item.get_locus (), false ,
208
+ path, item.get_node_id (), item.get_locus (), false , Rib::ItemType::Type,
206
209
[&] (const CanonicalPath &, NodeId, Location locus) -> void {
207
210
RichLocation r (item.get_locus ());
208
211
r.add_range (locus);
@@ -227,7 +230,7 @@ class ResolveStmt : public ResolverBase
227
230
mappings->insert_canonical_path (item.get_node_id (), cpath);
228
231
229
232
resolver->get_type_scope ().insert (
230
- path, item.get_node_id (), item.get_locus (), false ,
233
+ path, item.get_node_id (), item.get_locus (), false , Rib::ItemType::Type,
231
234
[&] (const CanonicalPath &, NodeId, Location locus) -> void {
232
235
RichLocation r (item.get_locus ());
233
236
r.add_range (locus);
@@ -247,6 +250,7 @@ class ResolveStmt : public ResolverBase
247
250
248
251
resolver->get_type_scope ().insert (
249
252
path, struct_decl.get_node_id (), struct_decl.get_locus (), false ,
253
+ Rib::ItemType::Type,
250
254
[&] (const CanonicalPath &, NodeId, Location locus) -> void {
251
255
RichLocation r (struct_decl.get_locus ());
252
256
r.add_range (locus);
@@ -283,6 +287,7 @@ class ResolveStmt : public ResolverBase
283
287
284
288
resolver->get_type_scope ().insert (
285
289
path, union_decl.get_node_id (), union_decl.get_locus (), false ,
290
+ Rib::ItemType::Type,
286
291
[&] (const CanonicalPath &, NodeId, Location locus) -> void {
287
292
RichLocation r (union_decl.get_locus ());
288
293
r.add_range (locus);
@@ -317,6 +322,7 @@ class ResolveStmt : public ResolverBase
317
322
318
323
resolver->get_name_scope ().insert (
319
324
path, function.get_node_id (), function.get_locus (), false ,
325
+ Rib::ItemType::Function,
320
326
[&] (const CanonicalPath &, NodeId, Location locus) -> void {
321
327
RichLocation r (function.get_locus ());
322
328
r.add_range (locus);
@@ -343,7 +349,8 @@ class ResolveStmt : public ResolverBase
343
349
for (auto ¶m : function.get_function_params ())
344
350
{
345
351
ResolveType::go (param.get_type ().get ());
346
- PatternDeclaration::go (param.get_pattern ().get ());
352
+ PatternDeclaration::go (param.get_pattern ().get (),
353
+ Rib::ItemType::Param);
347
354
}
348
355
349
356
// resolve the function body
0 commit comments