Skip to content

Commit

Permalink
Merge pull request #28 from lambdaclass/better
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
edg-l authored Dec 11, 2024
2 parents 34d6854 + 85f6ac2 commit 2274ee7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/src/workshop_p2.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The language AST is quite simple, it consists of the following:
#[derive(Debug, Clone)]
pub enum Expr {
Number(i64),
Call { target: String, args: Vec<Expr> },
Variable(String),
Op(Box<Expr>, Opcode, Box<Expr>),
}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/workshop_p6.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ With this dialect you don't need to add extra blocks, since the control flow wil
The only limitation is that we can't do early returns this way, but for this simple language it won't matter.

> You will need to clone the `locals` HashMap inside the created regions to avoid lifetime issues. But since any variable created
inside the if or else block only live for that scope, it works good.
inside the if or else block only live for that scope, it works well.

```rust
// src/codegen/ifelse_stmt.rs
Expand Down

0 comments on commit 2274ee7

Please sign in to comment.