mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-20 18:49:50 +00:00
some work on expect comment regions
This commit is contained in:
parent
7597d11b59
commit
5a93da5a11
3 changed files with 20 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue