actually use the new parser

This commit is contained in:
Folkert 2022-05-26 15:32:04 +02:00
parent fa9ac912a0
commit bab81fd941
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
3 changed files with 35 additions and 86 deletions

View file

@ -391,6 +391,19 @@ impl<'a> Defs<'a> {
self.push_def_help(tag, region, spaces_before, spaces_after)
}
pub fn replace_with_value_def(
&mut self,
index: usize,
value_def: ValueDef<'a>,
region: Region,
) {
let value_def_index = Index::push_new(&mut self.value_defs, value_def);
let tag = EitherIndex::from_right(value_def_index);
self.tags[index] = tag;
self.regions[index] = region;
}
pub fn push_type_def(
&mut self,
type_def: TypeDef<'a>,