Qt 4.8
Macros | Functions
qscriptparser.cpp File Reference
#include <QtCore/QtDebug>
#include <string.h>
#include "qscriptparser_p.h"

Go to the source code of this file.

Macros

#define Q_SCRIPT_UPDATE_POSITION(node, startloc, endloc)
 

Functions

static bool automatic (QScriptEnginePrivate *driver, int token)
 
static QScriptParser::Location location (QScript::Lexer *lexer)
 

Macro Definition Documentation

◆ Q_SCRIPT_UPDATE_POSITION

#define Q_SCRIPT_UPDATE_POSITION (   node,
  startloc,
  endloc 
)
Value:
do { \
node->startLine = startloc.startLine; \
node->startColumn = startloc.startColumn; \
node->endLine = endloc.endLine; \
node->endColumn = endloc.endColumn; \
} while (0)

Definition at line 31 of file qscriptparser.cpp.

Referenced by QScriptParser::parse().

Function Documentation

◆ automatic()

static bool automatic ( QScriptEnginePrivate driver,
int  token 
)
inlinestatic

Definition at line 49 of file qscriptparser.cpp.

Referenced by QScriptParser::parse().

50 {
51  return token == QScriptGrammar::T_RBRACE
52  || token == 0
53  || driver->lexer()->prevTerminator();
54 }

◆ location()

static QScriptParser::Location location ( QScript::Lexer lexer)
inlinestatic

Definition at line 75 of file qscriptparser.cpp.

Referenced by QScriptParser::parse().

76 {
78  loc.startLine = lexer->startLineNo();
79  loc.startColumn = lexer->startColumnNo();
80  loc.endLine = lexer->endLineNo();
81  loc.endColumn = lexer->endColumnNo();
82  return loc;
83 }
int startLineNo() const
int endColumnNo() const
int endLineNo() const
int startColumnNo() const