Skip to content

Commit

Permalink
Add newline to print statements for improved output formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-blazer committed Dec 20, 2024
1 parent b9a6d69 commit bfc6beb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ void Interpreter::executeClassDeclaration(ClassDeclarationNode* node) {

void Interpreter::executePrintStatement(PrintStatementNode* node) {
executeNode(node->value);
std::cout << std::endl;
}

void Interpreter::executeExpressionStatement(ExpressionStatementNode* node) {
Expand All @@ -110,7 +111,7 @@ void Interpreter::executeUnaryExpression(UnaryExpressionNode* node) {
}

void Interpreter::executeLiteral(LiteralNode* node) {
std::cout << node->value << std::endl;
std::cout << node->value;
}

void Interpreter::executeVariable(VariableNode* node) {
Expand Down

0 comments on commit bfc6beb

Please sign in to comment.