mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 14:05:33 +00:00
[2375] Return a reference to the token
The copy is shallow anyway, so it wouldn't survive for long.
This commit is contained in:
@@ -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.
|
||||
///
|
||||
|
Reference in New Issue
Block a user