Commit e27a2922 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2375] Return a reference to the token

The copy is shallow anyway, so it wouldn't survive for long.
parent 907061f8
......@@ -164,7 +164,7 @@ MasterLexer::getSourceLine() const {
return (impl_->sources_.back()->getCurrentLine());
}
MasterLexer::Token
const MasterLexer::Token&
MasterLexer::getNextToken(Options options) {
// If the source is not available
if (impl_->source_ == NULL) {
......
......@@ -213,7 +213,7 @@ public:
/// source (eg. I/O error in the file on the disk).
/// \throw std::bad_alloc in case allocation of some internal resources
/// or the token fail.
Token getNextToken(Options options = NONE);
const Token& getNextToken(Options options = NONE);
/// \brief Return the last token back to the lexer.
///
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment