mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-03 18:29:00 +00:00
fix: array pattern matching
This commit is contained in:
parent
5a6cea0df1
commit
952e6ccd2e
5 changed files with 121 additions and 2 deletions
|
@ -290,6 +290,13 @@ impl PyCodeGenerator {
|
|||
self.cur_block().lasti
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[allow(dead_code)]
|
||||
fn debug_print(&mut self, value: impl Into<ValueObj>) {
|
||||
self.emit_load_const(value);
|
||||
self.emit_print_expr();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[allow(dead_code)]
|
||||
fn emit_print_expr(&mut self) {
|
||||
|
|
|
@ -252,8 +252,8 @@ impl ASTLowerer {
|
|||
arr.l_sqbr,
|
||||
arr.r_sqbr,
|
||||
Type::Failure,
|
||||
len,
|
||||
elem,
|
||||
len,
|
||||
)))
|
||||
}
|
||||
ast::Array::Normal(arr) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue