From dbf506444958881bcfc6b9e869d94539ec62e38c Mon Sep 17 00:00:00 2001 From: Kampfkarren Date: Wed, 27 Jul 2022 23:43:25 -0700 Subject: [PATCH] Change nextInterpolatedString return value --- Ast/include/Luau/Lexer.h | 2 +- Ast/src/Lexer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;