[flang] Fix bug with "expected ..." messages in token strings.

Original-commit: flang-compiler/f18@9cc84ba6fb
Reviewed-on: https://github.com/flang-compiler/f18/pull/14
Tree-same-pre-rewrite: false
This commit is contained in:
peter klausler 2018-02-20 10:35:04 -08:00
parent 3b544af6da
commit 2bfdbb87b7
2 changed files with 5 additions and 1 deletions

View File

@ -69,6 +69,10 @@ public:
extra_ += s;
return *this;
}
Message &operator+=(char ch) {
extra_ += ch;
return *this;
}
Provenance Emit(
std::ostream &, const AllSources &, bool echoSourceLine = true) const;

View File

@ -133,7 +133,7 @@ public:
} else if (*ch == tolower(*p)) {
ch.reset();
} else {
state->PutMessage(at, "expected '"_en_US) += str_ + '\'';
(state->PutMessage(at, "expected '"_en_US) += str_) += '\'';
return {};
}
}