mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-02 21:44:34 +00:00
eliminate lpop
and use into_iter
This commit is contained in:
parent
c59cace06b
commit
43a3fa6e30
2 changed files with 4 additions and 4 deletions
|
@ -28,10 +28,10 @@ impl Reorderer {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn reorder(mut self, mut ast: AST) -> Result<AST, TyCheckErrors> {
|
||||
pub fn reorder(mut self, ast: AST) -> Result<AST, TyCheckErrors> {
|
||||
log!(info "the reordering process has started.");
|
||||
let mut new = vec![];
|
||||
while let Some(chunk) = ast.module.lpop() {
|
||||
for chunk in ast.module.into_iter() {
|
||||
match chunk {
|
||||
Expr::Def(def) => {
|
||||
match def.body.block.first().unwrap() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue