Skip to content

Commit

Permalink
fix: test fails because of bad assignments (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
y1yang0 committed Jul 31, 2024
1 parent 33cf5b3 commit 6c9c73a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tool/instrument/inst_func.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (rp *RuleProcessor) insertTJump(t *api.InstFuncRule, funcDecl *dst.FuncDecl
}
return clone
}())
tjumpInit := shared.AssignStmts(
tjumpInit := shared.DefineStmts(
shared.Exprs(
shared.Ident(TrampolineCallContextName+varSuffix),
shared.Ident(TrampolineSkipName+varSuffix),
Expand Down
4 changes: 2 additions & 2 deletions tool/shared/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ func AssignStmt(lhs, rhs dst.Expr) *dst.AssignStmt {
}
}

func AssignStmts(lhs, rhs []dst.Expr) *dst.AssignStmt {
func DefineStmts(lhs, rhs []dst.Expr) *dst.AssignStmt {
return &dst.AssignStmt{
Lhs: lhs,
Tok: token.ASSIGN,
Tok: token.DEFINE,
Rhs: rhs,
}
}
Expand Down

0 comments on commit 6c9c73a

Please sign in to comment.