Qt 4.8
Classes | Macros | Functions | Variables
qdeclarativescriptparser.cpp File Reference
#include "private/qdeclarativescriptparser_p.h"
#include "private/qdeclarativeparser_p.h"
#include "parser/qdeclarativejsengine_p.h"
#include "parser/qdeclarativejsparser_p.h"
#include "parser/qdeclarativejslexer_p.h"
#include "parser/qdeclarativejsnodepool_p.h"
#include "parser/qdeclarativejsastvisitor_p.h"
#include "parser/qdeclarativejsast_p.h"
#include "private/qdeclarativerewrite_p.h"
#include <QStack>
#include <QCoreApplication>
#include <QtDebug>

Go to the source code of this file.

Classes

class  QDeclarativeScriptParserJsASTData
 

Macros

#define CHECK_LINE   if(l.currentLineNo() != startLine) return rv;
 
#define CHECK_TOKEN(t)   if (token != QDeclarativeJSGrammar:: t) return rv;
 

Functions

static bool isUriToken (int token)
 
static void replaceWithSpace (QString &str, int idx, int n)
 

Variables

static const int uriTokens []
 

Macro Definition Documentation

◆ CHECK_LINE

#define CHECK_LINE   if(l.currentLineNo() != startLine) return rv;

◆ CHECK_TOKEN

#define CHECK_TOKEN (   t)    if (token != QDeclarativeJSGrammar:: t) return rv;

Function Documentation

◆ isUriToken()

static bool isUriToken ( int  token)
inlinestatic

Definition at line 996 of file qdeclarativescriptparser.cpp.

Referenced by QDeclarativeScriptParser::extractMetaData().

997 {
998  const int *current = uriTokens;
999  while (*current != QDeclarativeJSGrammar::EOF_SYMBOL) {
1000  if (*current == token)
1001  return true;
1002  ++current;
1003  }
1004  return false;
1005 }
static const int uriTokens[]

◆ replaceWithSpace()

static void replaceWithSpace ( QString str,
int  idx,
int  n 
)
static

Definition at line 891 of file qdeclarativescriptparser.cpp.

Referenced by QDeclarativeScriptParser::extractMetaData(), and QDeclarativeScriptParser::extractPragmas().

892 {
893  QChar *data = str.data() + idx;
894  const QChar space(QLatin1Char(' '));
895  for (int ii = 0; ii < n; ++ii)
896  *data++ = space;
897 }
The QChar class provides a 16-bit Unicode character.
Definition: qchar.h:72
QChar * data()
Returns a pointer to the data stored in the QString.
Definition: qstring.h:710
static const char * data(const QByteArray &arr)
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55

Variable Documentation

◆ uriTokens

const int uriTokens[]
static

Definition at line 956 of file qdeclarativescriptparser.cpp.

Referenced by isUriToken().