mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Remove unneeded lexer APIs
This commit is contained in:
parent
ea01fe3b34
commit
beb7ecceb1
3 changed files with 0 additions and 27 deletions
|
@ -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)
|
||||
|
|
|
@ -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<Lexeme> 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);
|
||||
|
|
|
@ -2684,8 +2684,6 @@ AstExpr* Parser::parseInterpString()
|
|||
|
||||
expressions.push_back(expression);
|
||||
|
||||
lexer.decrementInterpolatedStringDepth();
|
||||
|
||||
auto next = lexer.nextInterpolatedString();
|
||||
|
||||
switch (next.type)
|
||||
|
|
Loading…
Add table
Reference in a new issue