Show the variable name when asking the user for some input.
This commit is contained in:
parent
761ce64ca2
commit
8e80aa4969
|
@ -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);
|
||||
}
|
||||
|
|
Reference in New Issue
Block a user