feat: compile Endor await expressions through the source pipeline
This commit is contained in:
@@ -332,7 +332,9 @@ impl Builder {
|
||||
binding,
|
||||
});
|
||||
}
|
||||
ExprKind::Unary { operand, .. } => self.expression(operand, globals)?,
|
||||
ExprKind::Unary { operand, .. } | ExprKind::Await { operand } => {
|
||||
self.expression(operand, globals)?
|
||||
}
|
||||
ExprKind::Binary { left, right, .. } => {
|
||||
self.expression(left, globals)?;
|
||||
self.expression(right, globals)?;
|
||||
|
||||
@@ -300,6 +300,10 @@ impl<'a> Emitter<'a> {
|
||||
}
|
||||
self.emit(Opcode::Call, arguments.len())?;
|
||||
}
|
||||
ExprKind::Await { operand } => {
|
||||
self.expression(operand)?;
|
||||
self.simple(Opcode::Await);
|
||||
}
|
||||
ExprKind::Member { object, name } => {
|
||||
self.expression(object)?;
|
||||
self.emit(Opcode::LoadAttr, self.name_index(&name.text))?;
|
||||
|
||||
Reference in New Issue
Block a user