forked from qt-creator/qt-creator
QmlJS: Update to latest QmlJS parser from Qt 5.
Using qtdeclarative revision c9b7582a2e7ad9fcd03dd999c3b7a16b72803238 Change-Id: I9c942fa04c3fab5ef57b38e13471d0a4e2e8a2bf Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -28,8 +28,8 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include <QtDebug>
|
||||
#include <QCoreApplication>
|
||||
#include <QtCore/QtDebug>
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -59,10 +59,10 @@ void Parser::reallocateStack()
|
||||
else
|
||||
stack_size <<= 1;
|
||||
|
||||
sym_stack = reinterpret_cast<Value*> (qRealloc(sym_stack, stack_size * sizeof(Value)));
|
||||
state_stack = reinterpret_cast<int*> (qRealloc(state_stack, stack_size * sizeof(int)));
|
||||
location_stack = reinterpret_cast<AST::SourceLocation*> (qRealloc(location_stack, stack_size * sizeof(AST::SourceLocation)));
|
||||
string_stack = reinterpret_cast<QStringRef*> (qRealloc(string_stack, stack_size * sizeof(QStringRef)));
|
||||
sym_stack = reinterpret_cast<Value*> (realloc(sym_stack, stack_size * sizeof(Value)));
|
||||
state_stack = reinterpret_cast<int*> (realloc(state_stack, stack_size * sizeof(int)));
|
||||
location_stack = reinterpret_cast<AST::SourceLocation*> (realloc(location_stack, stack_size * sizeof(AST::SourceLocation)));
|
||||
string_stack = reinterpret_cast<QStringRef*> (realloc(string_stack, stack_size * sizeof(QStringRef)));
|
||||
}
|
||||
|
||||
Parser::Parser(Engine *engine):
|
||||
@@ -74,6 +74,7 @@ Parser::Parser(Engine *engine):
|
||||
state_stack(0),
|
||||
location_stack(0),
|
||||
string_stack(0),
|
||||
program(0),
|
||||
first_token(0),
|
||||
last_token(0)
|
||||
{
|
||||
@@ -82,10 +83,10 @@ Parser::Parser(Engine *engine):
|
||||
Parser::~Parser()
|
||||
{
|
||||
if (stack_size) {
|
||||
qFree(sym_stack);
|
||||
qFree(state_stack);
|
||||
qFree(location_stack);
|
||||
qFree(string_stack);
|
||||
free(sym_stack);
|
||||
free(state_stack);
|
||||
free(location_stack);
|
||||
free(string_stack);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user