Skip to content

Commit

Permalink
minor transformer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
serkonda7 committed Jan 5, 2025
1 parent 60b6e8c commit bfc13d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/bait/ast/ast.bt
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub struct CallExpr {
global concrete_types []Type
global is_field bool
global noreturn bool
pub args []CallArg
global args []CallArg
global or_block OrBlock
pub is_method bool
pub pkg string
Expand All @@ -215,8 +215,8 @@ pub struct CallExpr {

pub struct CallArg {
global typ Type
global expr Expr
pub is_mut bool
pub expr Expr
}

pub enum OrKind {
Expand Down
4 changes: 2 additions & 2 deletions lib/bait/transformer/transformer.bt
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ fun (t Transformer) return_stmt(mut node ast.ReturnStmt) {

fun (t Transformer) call_expr(mut node ast.CallExpr) {
_ = t.expr(node.left)
for arg in node.args {
_ = t.expr(arg.expr)
for mut arg in node.args {
arg.expr = t.expr(arg.expr)
}

if node.or_block.kind == .block {
Expand Down

0 comments on commit bfc13d5

Please sign in to comment.