some work on expect comment regions

This commit is contained in:
Folkert 2022-07-19 00:32:04 +02:00 committed by Richard Feldman
parent 7597d11b59
commit 5a93da5a11
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
3 changed files with 20 additions and 4 deletions

View file

@ -2190,12 +2190,17 @@ impl Declarations {
index
}
pub fn push_expect(&mut self, name: Symbol, loc_expr: Loc<Expr>) -> usize {
pub fn push_expect(
&mut self,
preceding_comment: Region,
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(name));
self.symbols.push(Loc::at(preceding_comment, name));
self.annotations.push(None);
self.expressions.push(loc_expr);