diff --git a/Ast/include/Luau/Lexer.h b/Ast/include/Luau/Lexer.h index 57877454..d6fe24f8 100644 --- a/Ast/include/Luau/Lexer.h +++ b/Ast/include/Luau/Lexer.h @@ -173,7 +173,7 @@ public: void setSkipComments(bool skip); void setReadNames(bool read); - const Lexeme nextInterpolatedString(); + const Lexeme& nextInterpolatedString(); const Location& previousLocation() const { diff --git a/Ast/src/Lexer.cpp b/Ast/src/Lexer.cpp index 093f10c1..c4443c90 100644 --- a/Ast/src/Lexer.cpp +++ b/Ast/src/Lexer.cpp @@ -587,7 +587,7 @@ Lexeme Lexer::readQuotedString() return Lexeme(Location(start, position()), Lexeme::QuotedString, &buffer[startOffset], offset - startOffset - 1); } -const Lexeme Lexer::nextInterpolatedString() +const Lexeme& Lexer::nextInterpolatedString() { Position start = position(); unsigned int startOffset = offset;