Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 2aa97a9

Browse files
committed
Removed fmt.Printf statements
These were generally on error-paths, but they shouldn't be necessary.
1 parent e549712 commit 2aa97a9

File tree

3 files changed

+0
-7
lines changed

3 files changed

+0
-7
lines changed

evaluator/evaluator.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,6 @@ func evalAssignStatement(ctx context.Context, a *ast.AssignStatement, env *objec
680680

681681
res := evalInfixExpression("+=", current, evaluated, env)
682682
if isError(res) {
683-
fmt.Printf("Error handling += %s\n", res.Inspect())
684683
return res
685684
}
686685

@@ -697,7 +696,6 @@ func evalAssignStatement(ctx context.Context, a *ast.AssignStatement, env *objec
697696

698697
res := evalInfixExpression("-=", current, evaluated, env)
699698
if isError(res) {
700-
fmt.Printf("Error handling -= %s\n", res.Inspect())
701699
return res
702700
}
703701

@@ -713,7 +711,6 @@ func evalAssignStatement(ctx context.Context, a *ast.AssignStatement, env *objec
713711

714712
res := evalInfixExpression("*=", current, evaluated, env)
715713
if isError(res) {
716-
fmt.Printf("Error handling *= %s\n", res.Inspect())
717714
return res
718715
}
719716

@@ -730,7 +727,6 @@ func evalAssignStatement(ctx context.Context, a *ast.AssignStatement, env *objec
730727

731728
res := evalInfixExpression("/=", current, evaluated, env)
732729
if isError(res) {
733-
fmt.Printf("Error handling /= %s\n", res.Inspect())
734730
return res
735731
}
736732

lexer/lexer.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ func (l *Lexer) NextToken() token.Token {
181181
tok.Type = token.REGEXP
182182
tok.Literal = str
183183
} else {
184-
fmt.Printf("%s\n", err.Error())
185184
tok.Type = token.REGEXP
186185
tok.Literal = str
187186
}

parser/parser.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ func (p *Parser) parseSwitchStatement() ast.Expression {
462462

463463
msg := fmt.Sprintf("expected token to be '{', got %s instead", p.curToken.Type)
464464
p.errors = append(p.errors, msg)
465-
fmt.Printf("error\n")
466465
return nil
467466
}
468467

@@ -472,7 +471,6 @@ func (p *Parser) parseSwitchStatement() ast.Expression {
472471
if !p.curTokenIs(token.RBRACE) {
473472
msg := fmt.Sprintf("Syntax Error: expected token to be '}', got %s instead", p.curToken.Type)
474473
p.errors = append(p.errors, msg)
475-
fmt.Printf("error\n")
476474
return nil
477475

478476
}

0 commit comments

Comments
 (0)