Skip to content

Commit

Permalink
Update logging function to log elements on the same line
Browse files Browse the repository at this point in the history
  • Loading branch information
asynchroza committed Nov 19, 2023
1 parent 850762a commit fef91fc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@ install-gtest:

.PHONY: build-interpreter
build-interpreter:
cd nulascript/interpreter/build && cmake . && cmake --build . && cp nulascript ../../../bin
cd nulascript/interpreter/build && cmake . && cmake --build . && cp nulascript ../../../bin

.PHONY: build
build:
make build-interpreter
Binary file modified bin/nulascript
Binary file not shown.
8 changes: 3 additions & 5 deletions nulascript/eval/eval.cc
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,12 @@ Storage* invoke(Storage* invocation, std::vector<Storage*> args) {
// STANDARD FUNCTION DEFINITIONS

Storage* printStorage(std::vector<Storage*> args) {
if (args.size() == 0) {
std::cout << "\n";
}

for (auto arg : args) {
std::cout << arg->evaluate() << "\n";
std::cout << arg->evaluate() << " ";
}

std::cout << "\n";

return emptyStorage;
}

Expand Down

0 comments on commit fef91fc

Please sign in to comment.