@@ -108,12 +108,12 @@ fn index_declaration(state: &mut State, cst: &cst::Declaration) {
108
108
cst:: Declaration :: ValueSignature ( cst) => {
109
109
let id = state. source . allocate_value_signature ( cst) ;
110
110
let term_id = index_value_signature ( state, id, cst) ;
111
- state. pairs . term_declarations . push ( ( declaration_id, term_id) ) ;
111
+ state. pairs . declaration_to_term . push ( ( declaration_id, term_id) ) ;
112
112
}
113
113
cst:: Declaration :: ValueEquation ( cst) => {
114
114
let id = state. source . allocate_value_equation ( cst) ;
115
115
let term_id = index_value_equation ( state, id, cst) ;
116
- state. pairs . term_declarations . push ( ( declaration_id, term_id) ) ;
116
+ state. pairs . declaration_to_term . push ( ( declaration_id, term_id) ) ;
117
117
}
118
118
cst:: Declaration :: InfixDeclaration ( cst) => {
119
119
let id = state. source . allocate_infix ( cst) ;
@@ -129,7 +129,7 @@ fn index_declaration(state: &mut State, cst: &cst::Declaration) {
129
129
let instance_id = state. source . allocate_instance ( & cst) ;
130
130
let term_id = index_instance ( state, instance_id, & cst) ;
131
131
state. pairs . instance_chain . push ( ( chain_id, instance_id) ) ;
132
- state. pairs . term_declarations . push ( ( declaration_id, term_id) ) ;
132
+ state. pairs . declaration_to_term . push ( ( declaration_id, term_id) ) ;
133
133
if let Some ( cst) = cst. instance_statements ( ) {
134
134
for cst in cst. children ( ) {
135
135
let m_id = state. source . allocate_instance_member ( & cst) ;
@@ -159,7 +159,7 @@ fn index_declaration(state: &mut State, cst: &cst::Declaration) {
159
159
}
160
160
} ,
161
161
) ;
162
- state. pairs . type_declarations . push ( ( declaration_id, type_id) ) ;
162
+ state. pairs . declaration_to_type . push ( ( declaration_id, type_id) ) ;
163
163
}
164
164
cst:: Declaration :: TypeSynonymEquation ( cst) => {
165
165
let id = state. source . allocate_type_equation ( cst) ;
@@ -182,7 +182,7 @@ fn index_declaration(state: &mut State, cst: &cst::Declaration) {
182
182
}
183
183
} ,
184
184
) ;
185
- state. pairs . type_declarations . push ( ( declaration_id, type_id) ) ;
185
+ state. pairs . declaration_to_type . push ( ( declaration_id, type_id) ) ;
186
186
}
187
187
cst:: Declaration :: ClassSignature ( cst) => {
188
188
let id = state. source . allocate_class_signature ( cst) ;
@@ -205,7 +205,7 @@ fn index_declaration(state: &mut State, cst: &cst::Declaration) {
205
205
}
206
206
} ,
207
207
) ;
208
- state. pairs . type_declarations . push ( ( declaration_id, type_id) ) ;
208
+ state. pairs . declaration_to_type . push ( ( declaration_id, type_id) ) ;
209
209
}
210
210
cst:: Declaration :: ClassDeclaration ( cst) => {
211
211
let id = state. source . allocate_class_declaration ( cst) ;
@@ -233,19 +233,20 @@ fn index_declaration(state: &mut State, cst: &cst::Declaration) {
233
233
let member_id = state. source . allocate_class_member ( & cst) ;
234
234
let term_id = index_class_member ( state, member_id, & cst) ;
235
235
state. pairs . class_members . push ( ( type_id, term_id) ) ;
236
+ state. pairs . class_member_to_term . push ( ( member_id, term_id) ) ;
236
237
}
237
238
}
238
- state. pairs . type_declarations . push ( ( declaration_id, type_id) ) ;
239
+ state. pairs . declaration_to_type . push ( ( declaration_id, type_id) ) ;
239
240
}
240
241
cst:: Declaration :: ForeignImportDataDeclaration ( cst) => {
241
242
let id = state. source . allocate_foreign_data ( cst) ;
242
243
let type_id = index_foreign_data ( state, id, cst) ;
243
- state. pairs . type_declarations . push ( ( declaration_id, type_id) ) ;
244
+ state. pairs . declaration_to_type . push ( ( declaration_id, type_id) ) ;
244
245
}
245
246
cst:: Declaration :: ForeignImportValueDeclaration ( cst) => {
246
247
let id = state. source . allocate_foreign_value ( cst) ;
247
248
let term_id = index_foreign_value ( state, id, cst) ;
248
- state. pairs . term_declarations . push ( ( declaration_id, term_id) ) ;
249
+ state. pairs . declaration_to_term . push ( ( declaration_id, term_id) ) ;
249
250
}
250
251
cst:: Declaration :: NewtypeSignature ( cst) => {
251
252
let id = state. source . allocate_newtype_signature ( cst) ;
@@ -268,7 +269,7 @@ fn index_declaration(state: &mut State, cst: &cst::Declaration) {
268
269
}
269
270
} ,
270
271
) ;
271
- state. pairs . type_declarations . push ( ( declaration_id, type_id) ) ;
272
+ state. pairs . declaration_to_type . push ( ( declaration_id, type_id) ) ;
272
273
}
273
274
cst:: Declaration :: NewtypeEquation ( cst) => {
274
275
let id = state. source . allocate_newtype_equation ( cst) ;
@@ -295,8 +296,9 @@ fn index_declaration(state: &mut State, cst: &cst::Declaration) {
295
296
let constructor_id = state. source . allocate_data_constructor ( & cst) ;
296
297
let term_id = index_data_constructor ( state, constructor_id, & cst) ;
297
298
state. pairs . data_constructors . push ( ( type_id, term_id) ) ;
299
+ state. pairs . constructor_to_term . push ( ( constructor_id, term_id) ) ;
298
300
}
299
- state. pairs . type_declarations . push ( ( declaration_id, type_id) ) ;
301
+ state. pairs . declaration_to_type . push ( ( declaration_id, type_id) ) ;
300
302
}
301
303
cst:: Declaration :: DataSignature ( cst) => {
302
304
let id = state. source . allocate_data_signature ( cst) ;
@@ -319,7 +321,7 @@ fn index_declaration(state: &mut State, cst: &cst::Declaration) {
319
321
}
320
322
} ,
321
323
) ;
322
- state. pairs . type_declarations . push ( ( declaration_id, type_id) ) ;
324
+ state. pairs . declaration_to_type . push ( ( declaration_id, type_id) ) ;
323
325
}
324
326
cst:: Declaration :: DataEquation ( cst) => {
325
327
let id = state. source . allocate_data_equation ( cst) ;
@@ -346,13 +348,14 @@ fn index_declaration(state: &mut State, cst: &cst::Declaration) {
346
348
let constructor_id = state. source . allocate_data_constructor ( & cst) ;
347
349
let term_id = index_data_constructor ( state, constructor_id, & cst) ;
348
350
state. pairs . data_constructors . push ( ( type_id, term_id) ) ;
351
+ state. pairs . constructor_to_term . push ( ( constructor_id, term_id) ) ;
349
352
}
350
- state. pairs . type_declarations . push ( ( declaration_id, type_id) ) ;
353
+ state. pairs . declaration_to_type . push ( ( declaration_id, type_id) ) ;
351
354
}
352
355
cst:: Declaration :: DeriveDeclaration ( cst) => {
353
356
let id = state. source . allocate_derive ( cst) ;
354
357
let term_id = index_derive ( state, id, cst) ;
355
- state. pairs . term_declarations . push ( ( declaration_id, term_id) ) ;
358
+ state. pairs . declaration_to_term . push ( ( declaration_id, term_id) ) ;
356
359
}
357
360
}
358
361
}
0 commit comments