42 #include "private/qdeclarativerewrite_p.h" 44 #include "private/qdeclarativeglobal_p.h" 46 #include <QtCore/qdebug.h> 71 AST::Node::acceptChild(node,
this);
93 return rewrite(code, 0, parser.
statement());
108 if(!expression && !statement)
118 unsigned startOfStatement = 0;
124 _writer->replace(startOfStatement, 0, startString);
128 qWarning() <<
"=============================================================";
139 qWarning() <<
"=============================================================";
147 AST::Node::acceptChild(node,
this);
167 qWarning() <<
"=============================================================";
177 qWarning() <<
"=============================================================";
188 accept(
it->statement);
199 _writer->replace(startOfExpressionStatement, 0,
QLatin1String(
"return "));
#define QT_END_NAMESPACE
This macro expands to.
#define it(className, varName)
DEFINE_BOOL_CONFIG_OPTION(rewriteDump, QML_REWRITE_DUMP)
virtual SourceLocation firstSourceLocation() const =0
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
virtual Statement * statementCast()
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
AST::Statement * statement() const
virtual SourceLocation lastSourceLocation() const =0
virtual SourceLocation firstSourceLocation() const =0
QString rewrite(QString code, unsigned position, AST::Statement *node)
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual SourceLocation lastSourceLocation() const =0
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Q_CORE_EXPORT void qWarning(const char *,...)
virtual bool visit(AST::Block *ast)
bool isSharable(const QString &code)
virtual ExpressionNode * expressionCast()
QString operator()(const QString &code, bool *ok=0, bool *sharable=0)
virtual void endVisit(AST::DoWhileStatement *ast)
StatementList * statements
void accept(AST::Node *node)
#define qPrintable(string)
virtual SourceLocation firstSourceLocation() const
void setCode(const QString &c, int lineno)