diff --git a/Ast/include/Luau/Lexer.h b/Ast/include/Luau/Lexer.h index ff10d489..428e247d 100644 --- a/Ast/include/Luau/Lexer.h +++ b/Ast/include/Luau/Lexer.h @@ -174,10 +174,7 @@ public: void setSkipComments(bool skip); void setReadNames(bool read); - void setReadAsInterpolatedStringExpression(bool read); - void incrementInterpolatedStringDepth(); - void decrementInterpolatedStringDepth(); const Lexeme nextInterpolatedString(); const Location& previousLocation() const @@ -249,9 +246,6 @@ private: bool skipComments; bool readNames; - bool readAsInterpolatedStringExpression; - - unsigned int interpolatedStringDepth; }; inline bool isSpace(char ch) diff --git a/Ast/src/Lexer.cpp b/Ast/src/Lexer.cpp index 04d97fb1..a7b75815 100644 --- a/Ast/src/Lexer.cpp +++ b/Ast/src/Lexer.cpp @@ -347,8 +347,6 @@ Lexer::Lexer(const char* buffer, size_t bufferSize, AstNameTable& names) , names(names) , skipComments(false) , readNames(true) - , readAsInterpolatedStringExpression(true) - , interpolatedStringDepth(0) { } @@ -362,22 +360,6 @@ void Lexer::setReadNames(bool read) readNames = read; } -// INTERP TODO: Probably not necessary -void Lexer::setReadAsInterpolatedStringExpression(bool read) -{ - readAsInterpolatedStringExpression = read; -} - -void Lexer::incrementInterpolatedStringDepth() -{ - interpolatedStringDepth++; -} - -void Lexer::decrementInterpolatedStringDepth() -{ - interpolatedStringDepth--; -} - const Lexeme& Lexer::next() { return next(this->skipComments, true); @@ -664,7 +646,6 @@ std::optional Lexer::readInterpolatedStringSection(Position start, Lexem return std::optional(Lexeme(Location(start, position()), Lexeme::BrokenInterpDoubleBrace)); } - incrementInterpolatedStringDepth(); auto lexemeOutput = Lexeme(Location(start, position()), Lexeme::InterpStringBegin, &buffer[startOffset], offset - startOffset); consume(); return std::optional(lexemeOutput); diff --git a/Ast/src/Parser.cpp b/Ast/src/Parser.cpp index 359b4c09..3b548442 100644 --- a/Ast/src/Parser.cpp +++ b/Ast/src/Parser.cpp @@ -2684,8 +2684,6 @@ AstExpr* Parser::parseInterpString() expressions.push_back(expression); - lexer.decrementInterpolatedStringDepth(); - auto next = lexer.nextInterpolatedString(); switch (next.type)