Qt 4.8
Public Functions | Static Public Functions | Properties | List of all members
QDeclarativeJS::Engine Class Reference

#include <qdeclarativejsengine_p.h>

Public Functions

void addComment (int pos, int len, int line, int col)
 
QList< QDeclarativeJS::AST::SourceLocationcomments () const
 
 Engine ()
 
NameIdintern (const QChar *u, int s)
 
Lexerlexer () const
 
QSet< NameIdliterals () const
 
NodePoolnodePool () const
 
void setLexer (Lexer *lexer)
 
void setNodePool (NodePool *nodePool)
 
 ~Engine ()
 

Static Public Functions

static QString toString (NameId *id)
 

Properties

QList< QDeclarativeJS::AST::SourceLocation_comments
 
Lexer_lexer
 
QSet< NameId_literals
 
NodePool_nodePool
 

Detailed Description

Definition at line 136 of file qdeclarativejsengine_p.h.

Constructors and Destructors

◆ Engine()

QDeclarativeJS::Engine::Engine ( )

Definition at line 174 of file qdeclarativejsengine_p.cpp.

◆ ~Engine()

QDeclarativeJS::Engine::~Engine ( )

Definition at line 178 of file qdeclarativejsengine_p.cpp.

179 { }

Functions

◆ addComment()

void QDeclarativeJS::Engine::addComment ( int  pos,
int  len,
int  line,
int  col 
)

Definition at line 184 of file qdeclarativejsengine_p.cpp.

Referenced by QDeclarativeJS::Lexer::lex().

185 { if (len > 0) _comments.append(QDeclarativeJS::AST::SourceLocation(pos, len, line, col)); }
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
QList< QDeclarativeJS::AST::SourceLocation > _comments

◆ comments()

QList< QDeclarativeJS::AST::SourceLocation > QDeclarativeJS::Engine::comments ( ) const

Definition at line 187 of file qdeclarativejsengine_p.cpp.

188 { return _comments; }
QList< QDeclarativeJS::AST::SourceLocation > _comments

◆ intern()

NameId * QDeclarativeJS::Engine::intern ( const QChar u,
int  s 
)

Definition at line 190 of file qdeclarativejsengine_p.cpp.

Referenced by QDeclarativeJS::Lexer::lex(), QDeclarativeJS::Parser::parse(), and QDeclarativeJS::Lexer::scanRegExp().

191 { return const_cast<NameId *>(&*_literals.insert(NameId(u, s))); }

◆ lexer()

Lexer * QDeclarativeJS::Engine::lexer ( ) const

Definition at line 196 of file qdeclarativejsengine_p.cpp.

Referenced by automatic(), QDeclarativeJS::Parser::parse(), and setLexer().

197 { return _lexer; }

◆ literals()

QSet< NameId > QDeclarativeJS::Engine::literals ( ) const

Definition at line 181 of file qdeclarativejsengine_p.cpp.

182 { return _literals; }

◆ nodePool()

NodePool * QDeclarativeJS::Engine::nodePool ( ) const

◆ setLexer()

void QDeclarativeJS::Engine::setLexer ( Lexer lexer)

◆ setNodePool()

void QDeclarativeJS::Engine::setNodePool ( NodePool nodePool)

◆ toString()

QString QDeclarativeJS::Engine::toString ( NameId id)
static

Definition at line 193 of file qdeclarativejsengine_p.cpp.

194 { return id->asString(); }

Properties

◆ _comments

QList<QDeclarativeJS::AST::SourceLocation> QDeclarativeJS::Engine::_comments
private

Definition at line 141 of file qdeclarativejsengine_p.h.

Referenced by addComment(), and comments().

◆ _lexer

Lexer* QDeclarativeJS::Engine::_lexer
private

Definition at line 138 of file qdeclarativejsengine_p.h.

Referenced by lexer(), and setLexer().

◆ _literals

QSet<NameId> QDeclarativeJS::Engine::_literals
private

Definition at line 140 of file qdeclarativejsengine_p.h.

Referenced by intern(), and literals().

◆ _nodePool

NodePool* QDeclarativeJS::Engine::_nodePool
private

Definition at line 139 of file qdeclarativejsengine_p.h.

Referenced by nodePool(), and setNodePool().


The documentation for this class was generated from the following files: