actually codegen expect

This commit is contained in:
Folkert 2022-06-26 01:10:40 +02:00
parent 9700777b15
commit 8cd0bd13c5
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
5 changed files with 66 additions and 5 deletions

View file

@ -2072,12 +2072,12 @@ impl Declarations {
index
}
pub fn push_expect(&mut self, loc_expr: Loc<Expr>) -> usize {
pub fn push_expect(&mut self, name: Symbol, loc_expr: Loc<Expr>) -> usize {
let index = self.declarations.len();
self.declarations.push(DeclarationTag::Expectation);
self.variables.push(Variable::BOOL);
self.symbols.push(Loc::at_zero(Symbol::ATTR_ATTR));
self.symbols.push(Loc::at_zero(name));
self.annotations.push(None);
self.expressions.push(loc_expr);