Skip to content

Commit

Permalink
Show the variable name when asking the user for some input.
Browse files Browse the repository at this point in the history
  • Loading branch information
esseks committed Dec 2, 2014
1 parent 761ce64 commit 8e80aa4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Nodes.cpp
Expand Up @@ -167,6 +167,10 @@ void Print::emit(std::ostream &stream, int indent) {
}

void Input::emit(std::ostream &stream, int indent) {
stream << "std::cout << \"";
variable->emit(stream);
stream << "? \";\n";
emitIndent(stream, indent);
stream << "std::cin >> ";
variable->emit(stream);
}
Expand Down

0 comments on commit 8e80aa4

Please sign in to comment.