Qt 4.8
Public Types | Public Functions | Static Public Functions | Public Variables | List of all members
QDeclarativeJS::AST::Node Class Referenceabstract

#include <qdeclarativejsast_p.h>

Inheritance diagram for QDeclarativeJS::AST::Node:
QDeclarativeJS::AST::ArgumentList QDeclarativeJS::AST::CaseBlock QDeclarativeJS::AST::CaseClause QDeclarativeJS::AST::CaseClauses QDeclarativeJS::AST::Catch QDeclarativeJS::AST::DefaultClause QDeclarativeJS::AST::ElementList QDeclarativeJS::AST::Elision QDeclarativeJS::AST::ExpressionNode QDeclarativeJS::AST::Finally QDeclarativeJS::AST::FormalParameterList QDeclarativeJS::AST::FunctionBody QDeclarativeJS::AST::Program QDeclarativeJS::AST::PropertyName QDeclarativeJS::AST::PropertyNameAndValueList QDeclarativeJS::AST::SourceElement QDeclarativeJS::AST::SourceElements QDeclarativeJS::AST::Statement QDeclarativeJS::AST::StatementList QDeclarativeJS::AST::UiArrayMemberList QDeclarativeJS::AST::UiFormal QDeclarativeJS::AST::UiFormalList QDeclarativeJS::AST::UiImport QDeclarativeJS::AST::UiImportList QDeclarativeJS::AST::UiObjectInitializer QDeclarativeJS::AST::UiObjectMember QDeclarativeJS::AST::UiObjectMemberList QDeclarativeJS::AST::UiParameterList QDeclarativeJS::AST::UiProgram QDeclarativeJS::AST::UiQualifiedId QDeclarativeJS::AST::UiSignature QDeclarativeJS::AST::VariableDeclaration QDeclarativeJS::AST::VariableDeclarationList

Public Types

enum  Kind {
  Kind_Undefined, Kind_ArgumentList, Kind_ArrayLiteral, Kind_ArrayMemberExpression,
  Kind_BinaryExpression, Kind_Block, Kind_BreakStatement, Kind_CallExpression,
  Kind_CaseBlock, Kind_CaseClause, Kind_CaseClauses, Kind_Catch,
  Kind_ConditionalExpression, Kind_ContinueStatement, Kind_DebuggerStatement, Kind_DefaultClause,
  Kind_DeleteExpression, Kind_DoWhileStatement, Kind_ElementList, Kind_Elision,
  Kind_EmptyStatement, Kind_Expression, Kind_ExpressionStatement, Kind_FalseLiteral,
  Kind_FieldMemberExpression, Kind_Finally, Kind_ForEachStatement, Kind_ForStatement,
  Kind_FormalParameterList, Kind_FunctionBody, Kind_FunctionDeclaration, Kind_FunctionExpression,
  Kind_FunctionSourceElement, Kind_IdentifierExpression, Kind_IdentifierPropertyName, Kind_IfStatement,
  Kind_LabelledStatement, Kind_LocalForEachStatement, Kind_LocalForStatement, Kind_NewExpression,
  Kind_NewMemberExpression, Kind_NotExpression, Kind_NullExpression, Kind_NumericLiteral,
  Kind_NumericLiteralPropertyName, Kind_ObjectLiteral, Kind_PostDecrementExpression, Kind_PostIncrementExpression,
  Kind_PreDecrementExpression, Kind_PreIncrementExpression, Kind_Program, Kind_PropertyName,
  Kind_PropertyNameAndValueList, Kind_RegExpLiteral, Kind_ReturnStatement, Kind_SourceElement,
  Kind_SourceElements, Kind_StatementList, Kind_StatementSourceElement, Kind_StringLiteral,
  Kind_StringLiteralPropertyName, Kind_SwitchStatement, Kind_ThisExpression, Kind_ThrowStatement,
  Kind_TildeExpression, Kind_TrueLiteral, Kind_TryStatement, Kind_TypeOfExpression,
  Kind_UnaryMinusExpression, Kind_UnaryPlusExpression, Kind_VariableDeclaration, Kind_VariableDeclarationList,
  Kind_VariableStatement, Kind_VoidExpression, Kind_WhileStatement, Kind_WithStatement,
  Kind_NestedExpression, Kind_UiArrayBinding, Kind_UiImport, Kind_UiImportList,
  Kind_UiObjectBinding, Kind_UiObjectDefinition, Kind_UiObjectInitializer, Kind_UiObjectMemberList,
  Kind_UiArrayMemberList, Kind_UiProgram, Kind_UiParameterList, Kind_UiPublicMember,
  Kind_UiQualifiedId, Kind_UiScriptBinding, Kind_UiSourceElement, Kind_UiFormal,
  Kind_UiFormalList, Kind_UiSignature
}
 

Public Functions

void accept (Visitor *visitor)
 
virtual void accept0 (Visitor *visitor)=0
 
virtual BinaryExpressionbinaryExpressionCast ()
 
virtual ExpressionNodeexpressionCast ()
 
 Node ()
 
virtual StatementstatementCast ()
 
virtual UiObjectMemberuiObjectMemberCast ()
 
virtual ~Node ()
 

Static Public Functions

static void accept (Node *node, Visitor *visitor)
 
static void acceptChild (Node *node, Visitor *visitor)
 

Public Variables

int kind
 

Detailed Description

Definition at line 122 of file qdeclarativejsast_p.h.

Enumerations

◆ Kind

Enumerator
Kind_Undefined 
Kind_ArgumentList 
Kind_ArrayLiteral 
Kind_ArrayMemberExpression 
Kind_BinaryExpression 
Kind_Block 
Kind_BreakStatement 
Kind_CallExpression 
Kind_CaseBlock 
Kind_CaseClause 
Kind_CaseClauses 
Kind_Catch 
Kind_ConditionalExpression 
Kind_ContinueStatement 
Kind_DebuggerStatement 
Kind_DefaultClause 
Kind_DeleteExpression 
Kind_DoWhileStatement 
Kind_ElementList 
Kind_Elision 
Kind_EmptyStatement 
Kind_Expression 
Kind_ExpressionStatement 
Kind_FalseLiteral 
Kind_FieldMemberExpression 
Kind_Finally 
Kind_ForEachStatement 
Kind_ForStatement 
Kind_FormalParameterList 
Kind_FunctionBody 
Kind_FunctionDeclaration 
Kind_FunctionExpression 
Kind_FunctionSourceElement 
Kind_IdentifierExpression 
Kind_IdentifierPropertyName 
Kind_IfStatement 
Kind_LabelledStatement 
Kind_LocalForEachStatement 
Kind_LocalForStatement 
Kind_NewExpression 
Kind_NewMemberExpression 
Kind_NotExpression 
Kind_NullExpression 
Kind_NumericLiteral 
Kind_NumericLiteralPropertyName 
Kind_ObjectLiteral 
Kind_PostDecrementExpression 
Kind_PostIncrementExpression 
Kind_PreDecrementExpression 
Kind_PreIncrementExpression 
Kind_Program 
Kind_PropertyName 
Kind_PropertyNameAndValueList 
Kind_RegExpLiteral 
Kind_ReturnStatement 
Kind_SourceElement 
Kind_SourceElements 
Kind_StatementList 
Kind_StatementSourceElement 
Kind_StringLiteral 
Kind_StringLiteralPropertyName 
Kind_SwitchStatement 
Kind_ThisExpression 
Kind_ThrowStatement 
Kind_TildeExpression 
Kind_TrueLiteral 
Kind_TryStatement 
Kind_TypeOfExpression 
Kind_UnaryMinusExpression 
Kind_UnaryPlusExpression 
Kind_VariableDeclaration 
Kind_VariableDeclarationList 
Kind_VariableStatement 
Kind_VoidExpression 
Kind_WhileStatement 
Kind_WithStatement 
Kind_NestedExpression 
Kind_UiArrayBinding 
Kind_UiImport 
Kind_UiImportList 
Kind_UiObjectBinding 
Kind_UiObjectDefinition 
Kind_UiObjectInitializer 
Kind_UiObjectMemberList 
Kind_UiArrayMemberList 
Kind_UiProgram 
Kind_UiParameterList 
Kind_UiPublicMember 
Kind_UiQualifiedId 
Kind_UiScriptBinding 
Kind_UiSourceElement 
Kind_UiFormal 
Kind_UiFormalList 
Kind_UiSignature 

Definition at line 125 of file qdeclarativejsast_p.h.

125  {
127 
132  Kind_Block,
138  Kind_Catch,
146  Kind_Elision,
152  Kind_Finally,
177  Kind_Program,
204 
222  };

Constructors and Destructors

◆ Node()

QDeclarativeJS::AST::Node::Node ( )
inline

◆ ~Node()

virtual QDeclarativeJS::AST::Node::~Node ( )
inlinevirtual

Definition at line 230 of file qdeclarativejsast_p.h.

230 {}

Functions

◆ accept() [1/2]

void Node::accept ( Visitor visitor)

Definition at line 50 of file qdeclarativejsast.cpp.

Referenced by accept(), QDeclarativeJS::AST::UiFormalList::accept0(), QDeclarativeJS::AST::UiSignature::accept0(), QDeclarativeJS::AST::NestedExpression::accept0(), QDeclarativeJS::AST::ArrayLiteral::accept0(), QDeclarativeJS::AST::ObjectLiteral::accept0(), QDeclarativeJS::AST::ElementList::accept0(), QDeclarativeJS::AST::PropertyNameAndValueList::accept0(), QDeclarativeJS::AST::ArrayMemberExpression::accept0(), QDeclarativeJS::AST::FieldMemberExpression::accept0(), QDeclarativeJS::AST::NewMemberExpression::accept0(), QDeclarativeJS::AST::NewExpression::accept0(), QDeclarativeJS::AST::CallExpression::accept0(), QDeclarativeJS::AST::ArgumentList::accept0(), QDeclarativeJS::AST::PostIncrementExpression::accept0(), QDeclarativeJS::AST::PostDecrementExpression::accept0(), QDeclarativeJS::AST::DeleteExpression::accept0(), QDeclarativeJS::AST::VoidExpression::accept0(), QDeclarativeJS::AST::TypeOfExpression::accept0(), QDeclarativeJS::AST::PreIncrementExpression::accept0(), QDeclarativeJS::AST::PreDecrementExpression::accept0(), QDeclarativeJS::AST::UnaryPlusExpression::accept0(), QDeclarativeJS::AST::UnaryMinusExpression::accept0(), QDeclarativeJS::AST::TildeExpression::accept0(), QDeclarativeJS::AST::NotExpression::accept0(), QDeclarativeJS::AST::BinaryExpression::accept0(), QDeclarativeJS::AST::ConditionalExpression::accept0(), QDeclarativeJS::AST::Expression::accept0(), QDeclarativeJS::AST::Block::accept0(), QDeclarativeJS::AST::StatementList::accept0(), QDeclarativeJS::AST::VariableStatement::accept0(), QDeclarativeJS::AST::VariableDeclaration::accept0(), QDeclarativeJS::AST::VariableDeclarationList::accept0(), QDeclarativeJS::AST::ExpressionStatement::accept0(), QDeclarativeJS::AST::IfStatement::accept0(), QDeclarativeJS::AST::DoWhileStatement::accept0(), QDeclarativeJS::AST::WhileStatement::accept0(), QDeclarativeJS::AST::ForStatement::accept0(), QDeclarativeJS::AST::LocalForStatement::accept0(), QDeclarativeJS::AST::ForEachStatement::accept0(), QDeclarativeJS::AST::LocalForEachStatement::accept0(), QDeclarativeJS::AST::ReturnStatement::accept0(), QDeclarativeJS::AST::WithStatement::accept0(), QDeclarativeJS::AST::CaseBlock::accept0(), QDeclarativeJS::AST::SwitchStatement::accept0(), QDeclarativeJS::AST::CaseClauses::accept0(), QDeclarativeJS::AST::CaseClause::accept0(), QDeclarativeJS::AST::DefaultClause::accept0(), QDeclarativeJS::AST::LabelledStatement::accept0(), QDeclarativeJS::AST::ThrowStatement::accept0(), QDeclarativeJS::AST::Catch::accept0(), QDeclarativeJS::AST::Finally::accept0(), QDeclarativeJS::AST::TryStatement::accept0(), QDeclarativeJS::AST::FunctionExpression::accept0(), QDeclarativeJS::AST::FunctionDeclaration::accept0(), QDeclarativeJS::AST::FunctionBody::accept0(), QDeclarativeJS::AST::Program::accept0(), QDeclarativeJS::AST::SourceElements::accept0(), QDeclarativeJS::AST::FunctionSourceElement::accept0(), QDeclarativeJS::AST::StatementSourceElement::accept0(), QDeclarativeJS::AST::UiProgram::accept0(), QDeclarativeJS::AST::UiImport::accept0(), QDeclarativeJS::AST::UiImportList::accept0(), QDeclarativeJS::AST::UiObjectMemberList::accept0(), QDeclarativeJS::AST::UiArrayMemberList::accept0(), QDeclarativeJS::AST::UiObjectInitializer::accept0(), QDeclarativeJS::AST::UiPublicMember::accept0(), QDeclarativeJS::AST::UiObjectDefinition::accept0(), QDeclarativeJS::AST::UiSourceElement::accept0(), QDeclarativeJS::AST::UiObjectBinding::accept0(), QDeclarativeJS::AST::UiScriptBinding::accept0(), and QDeclarativeJS::AST::UiArrayBinding::accept0().

51 {
52  if (visitor->preVisit(this)) {
53  accept0(visitor);
54  }
55  visitor->postVisit(this);
56 }
virtual void accept0(Visitor *visitor)=0

◆ accept() [2/2]

void Node::accept ( Node node,
Visitor visitor 
)
static

Definition at line 58 of file qdeclarativejsast.cpp.

59 {
60  if (node)
61  node->accept(visitor);
62 }

◆ accept0()

virtual void QDeclarativeJS::AST::Node::accept0 ( Visitor visitor)
pure virtual

Implemented in QDeclarativeJS::AST::UiArrayBinding, QDeclarativeJS::AST::UiScriptBinding, QDeclarativeJS::AST::UiObjectBinding, QDeclarativeJS::AST::UiSourceElement, QDeclarativeJS::AST::UiObjectDefinition, QDeclarativeJS::AST::UiPublicMember, QDeclarativeJS::AST::UiParameterList, QDeclarativeJS::AST::UiObjectInitializer, QDeclarativeJS::AST::UiArrayMemberList, QDeclarativeJS::AST::UiObjectMemberList, QDeclarativeJS::AST::UiImportList, QDeclarativeJS::AST::UiImport, QDeclarativeJS::AST::UiQualifiedId, QDeclarativeJS::AST::UiProgram, QDeclarativeJS::AST::DebuggerStatement, QDeclarativeJS::AST::StatementSourceElement, QDeclarativeJS::AST::FunctionSourceElement, QDeclarativeJS::AST::SourceElements, QDeclarativeJS::AST::Program, QDeclarativeJS::AST::FunctionBody, QDeclarativeJS::AST::FormalParameterList, QDeclarativeJS::AST::FunctionDeclaration, QDeclarativeJS::AST::FunctionExpression, QDeclarativeJS::AST::TryStatement, QDeclarativeJS::AST::Finally, QDeclarativeJS::AST::Catch, QDeclarativeJS::AST::ThrowStatement, QDeclarativeJS::AST::LabelledStatement, QDeclarativeJS::AST::DefaultClause, QDeclarativeJS::AST::CaseClause, QDeclarativeJS::AST::CaseClauses, QDeclarativeJS::AST::SwitchStatement, QDeclarativeJS::AST::CaseBlock, QDeclarativeJS::AST::WithStatement, QDeclarativeJS::AST::ReturnStatement, QDeclarativeJS::AST::BreakStatement, QDeclarativeJS::AST::ContinueStatement, QDeclarativeJS::AST::LocalForEachStatement, QDeclarativeJS::AST::ForEachStatement, QDeclarativeJS::AST::LocalForStatement, QDeclarativeJS::AST::ForStatement, QDeclarativeJS::AST::WhileStatement, QDeclarativeJS::AST::DoWhileStatement, QDeclarativeJS::AST::IfStatement, QDeclarativeJS::AST::ExpressionStatement, QDeclarativeJS::AST::EmptyStatement, QDeclarativeJS::AST::VariableDeclarationList, QDeclarativeJS::AST::VariableDeclaration, QDeclarativeJS::AST::VariableStatement, QDeclarativeJS::AST::StatementList, QDeclarativeJS::AST::Block, QDeclarativeJS::AST::Expression, QDeclarativeJS::AST::ConditionalExpression, QDeclarativeJS::AST::BinaryExpression, QDeclarativeJS::AST::NotExpression, QDeclarativeJS::AST::TildeExpression, QDeclarativeJS::AST::UnaryMinusExpression, QDeclarativeJS::AST::UnaryPlusExpression, QDeclarativeJS::AST::PreDecrementExpression, QDeclarativeJS::AST::PreIncrementExpression, QDeclarativeJS::AST::TypeOfExpression, QDeclarativeJS::AST::VoidExpression, QDeclarativeJS::AST::DeleteExpression, QDeclarativeJS::AST::PostDecrementExpression, QDeclarativeJS::AST::PostIncrementExpression, QDeclarativeJS::AST::ArgumentList, QDeclarativeJS::AST::CallExpression, QDeclarativeJS::AST::NewExpression, QDeclarativeJS::AST::NewMemberExpression, QDeclarativeJS::AST::FieldMemberExpression, QDeclarativeJS::AST::ArrayMemberExpression, QDeclarativeJS::AST::NumericLiteralPropertyName, QDeclarativeJS::AST::StringLiteralPropertyName, QDeclarativeJS::AST::IdentifierPropertyName, QDeclarativeJS::AST::PropertyNameAndValueList, QDeclarativeJS::AST::Elision, QDeclarativeJS::AST::ElementList, QDeclarativeJS::AST::ObjectLiteral, QDeclarativeJS::AST::ArrayLiteral, QDeclarativeJS::AST::RegExpLiteral, QDeclarativeJS::AST::StringLiteral, QDeclarativeJS::AST::NumericLiteral, QDeclarativeJS::AST::FalseLiteral, QDeclarativeJS::AST::TrueLiteral, QDeclarativeJS::AST::NullExpression, QDeclarativeJS::AST::IdentifierExpression, QDeclarativeJS::AST::ThisExpression, QDeclarativeJS::AST::NestedExpression, QDeclarativeJS::AST::UiSignature, QDeclarativeJS::AST::UiFormalList, and QDeclarativeJS::AST::UiFormal.

Referenced by accept().

◆ acceptChild()

static void QDeclarativeJS::AST::Node::acceptChild ( Node node,
Visitor visitor 
)
inlinestatic

Definition at line 240 of file qdeclarativejsast_p.h.

241  { return accept(node, visitor); } // ### remove
void accept(Visitor *visitor)

◆ binaryExpressionCast()

BinaryExpression * Node::binaryExpressionCast ( )
virtual

Reimplemented in QDeclarativeJS::AST::BinaryExpression.

Definition at line 69 of file qdeclarativejsast.cpp.

70 {
71  return 0;
72 }

◆ expressionCast()

ExpressionNode * Node::expressionCast ( )
virtual

◆ statementCast()

Statement * Node::statementCast ( )
virtual

Reimplemented in QDeclarativeJS::AST::Statement.

Definition at line 74 of file qdeclarativejsast.cpp.

Referenced by QDeclarativeRewrite::RewriteBinding::operator()().

75 {
76  return 0;
77 }

◆ uiObjectMemberCast()

UiObjectMember * Node::uiObjectMemberCast ( )
virtual

Reimplemented in QDeclarativeJS::AST::UiObjectMember.

Definition at line 79 of file qdeclarativejsast.cpp.

80 {
81  return 0;
82 }

Properties

◆ kind

int QDeclarativeJS::AST::Node::kind

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