forked from qt-creator/qt-creator
Make QmlJS(Tools) build with Qt5 & Qt6
Port from QStringRef to QStringView Change-Id: I472d16f20e40ca52b8e5d481850a6bd8a1a38f3b Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -207,10 +207,10 @@ protected:
|
||||
inline Value &sym(int index)
|
||||
{ return sym_stack [tos + index - 1]; }
|
||||
|
||||
inline QStringRef &stringRef(int index)
|
||||
inline QStringView &stringRef(int index)
|
||||
{ return string_stack [tos + index - 1]; }
|
||||
|
||||
inline QStringRef &rawStringRef(int index)
|
||||
inline QStringView &rawStringRef(int index)
|
||||
{ return rawString_stack [tos + index - 1]; }
|
||||
|
||||
inline SourceLocation &loc(int index)
|
||||
@@ -248,8 +248,8 @@ protected:
|
||||
Value *sym_stack = nullptr;
|
||||
int *state_stack = nullptr;
|
||||
SourceLocation *location_stack = nullptr;
|
||||
QVector<QStringRef> string_stack;
|
||||
QVector<QStringRef> rawString_stack;
|
||||
QVector<QStringView> string_stack;
|
||||
QVector<QStringView> rawString_stack;
|
||||
|
||||
AST::Node *program = nullptr;
|
||||
|
||||
@@ -260,14 +260,14 @@ protected:
|
||||
int token;
|
||||
double dval;
|
||||
SourceLocation loc;
|
||||
QStringRef spell;
|
||||
QStringRef raw;
|
||||
QStringView spell;
|
||||
QStringView raw;
|
||||
};
|
||||
|
||||
int yytoken = -1;
|
||||
double yylval = 0.;
|
||||
QStringRef yytokenspell;
|
||||
QStringRef yytokenraw;
|
||||
QStringView yytokenspell;
|
||||
QStringView yytokenraw;
|
||||
SourceLocation yylloc;
|
||||
SourceLocation yyprevlloc;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user