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

#include <qscriptast_p.h>

Inheritance diagram for QScript::AST::Node:
QScript::AST::ArgumentList QScript::AST::CaseBlock QScript::AST::CaseClause QScript::AST::CaseClauses QScript::AST::Catch QScript::AST::DefaultClause QScript::AST::ElementList QScript::AST::Elision QScript::AST::ExpressionNode QScript::AST::Finally QScript::AST::FormalParameterList QScript::AST::FunctionBody QScript::AST::Program QScript::AST::PropertyName QScript::AST::PropertyNameAndValueList QScript::AST::SourceElement QScript::AST::SourceElements QScript::AST::Statement QScript::AST::StatementList QScript::AST::VariableDeclaration QScript::AST::VariableDeclarationList

Public Types

enum  Kind {
  Kind_Node, Kind_ExpressionNode, Kind_Statement, Kind_ThisExpression,
  Kind_IdentifierExpression, Kind_NullExpression, Kind_TrueLiteral, Kind_FalseLiteral,
  Kind_NumericLiteral, Kind_StringLiteral, Kind_RegExpLiteral, Kind_ArrayLiteral,
  Kind_ObjectLiteral, Kind_ElementList, Kind_Elision, Kind_PropertyNameAndValueList,
  Kind_PropertyName, Kind_IdentifierPropertyName, Kind_StringLiteralPropertyName, Kind_NumericLiteralPropertyName,
  Kind_ArrayMemberExpression, Kind_FieldMemberExpression, Kind_NewMemberExpression, Kind_NewExpression,
  Kind_CallExpression, Kind_ArgumentList, Kind_PostIncrementExpression, Kind_PostDecrementExpression,
  Kind_DeleteExpression, Kind_VoidExpression, Kind_TypeOfExpression, Kind_PreIncrementExpression,
  Kind_PreDecrementExpression, Kind_UnaryPlusExpression, Kind_UnaryMinusExpression, Kind_TildeExpression,
  Kind_NotExpression, Kind_BinaryExpression, Kind_ConditionalExpression, Kind_Expression,
  Kind_Block, Kind_StatementList, Kind_VariableStatement, Kind_VariableDeclarationList,
  Kind_VariableDeclaration, Kind_EmptyStatement, Kind_ExpressionStatement, Kind_IfStatement,
  Kind_DoWhileStatement, Kind_WhileStatement, Kind_ForStatement, Kind_LocalForStatement,
  Kind_ForEachStatement, Kind_LocalForEachStatement, Kind_ContinueStatement, Kind_BreakStatement,
  Kind_ReturnStatement, Kind_WithStatement, Kind_SwitchStatement, Kind_CaseBlock,
  Kind_CaseClauses, Kind_CaseClause, Kind_DefaultClause, Kind_LabelledStatement,
  Kind_ThrowStatement, Kind_TryStatement, Kind_Catch, Kind_Finally,
  Kind_FunctionDeclaration, Kind_FunctionExpression, Kind_FormalParameterList, Kind_FunctionBody,
  Kind_Program, Kind_SourceElements, Kind_SourceElement, Kind_FunctionSourceElement,
  Kind_StatementSourceElement, Kind_DebuggerStatement
}
 

Public Functions

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

Static Public Functions

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

Public Variables

int endColumn
 
int endLine
 
Kind kind
 
int startColumn
 
int startLine
 

Detailed Description

Definition at line 91 of file qscriptast_p.h.

Enumerations

◆ Kind

Enumerator
Kind_Node 
Kind_ExpressionNode 
Kind_Statement 
Kind_ThisExpression 
Kind_IdentifierExpression 
Kind_NullExpression 
Kind_TrueLiteral 
Kind_FalseLiteral 
Kind_NumericLiteral 
Kind_StringLiteral 
Kind_RegExpLiteral 
Kind_ArrayLiteral 
Kind_ObjectLiteral 
Kind_ElementList 
Kind_Elision 
Kind_PropertyNameAndValueList 
Kind_PropertyName 
Kind_IdentifierPropertyName 
Kind_StringLiteralPropertyName 
Kind_NumericLiteralPropertyName 
Kind_ArrayMemberExpression 
Kind_FieldMemberExpression 
Kind_NewMemberExpression 
Kind_NewExpression 
Kind_CallExpression 
Kind_ArgumentList 
Kind_PostIncrementExpression 
Kind_PostDecrementExpression 
Kind_DeleteExpression 
Kind_VoidExpression 
Kind_TypeOfExpression 
Kind_PreIncrementExpression 
Kind_PreDecrementExpression 
Kind_UnaryPlusExpression 
Kind_UnaryMinusExpression 
Kind_TildeExpression 
Kind_NotExpression 
Kind_BinaryExpression 
Kind_ConditionalExpression 
Kind_Expression 
Kind_Block 
Kind_StatementList 
Kind_VariableStatement 
Kind_VariableDeclarationList 
Kind_VariableDeclaration 
Kind_EmptyStatement 
Kind_ExpressionStatement 
Kind_IfStatement 
Kind_DoWhileStatement 
Kind_WhileStatement 
Kind_ForStatement 
Kind_LocalForStatement 
Kind_ForEachStatement 
Kind_LocalForEachStatement 
Kind_ContinueStatement 
Kind_BreakStatement 
Kind_ReturnStatement 
Kind_WithStatement 
Kind_SwitchStatement 
Kind_CaseBlock 
Kind_CaseClauses 
Kind_CaseClause 
Kind_DefaultClause 
Kind_LabelledStatement 
Kind_ThrowStatement 
Kind_TryStatement 
Kind_Catch 
Kind_Finally 
Kind_FunctionDeclaration 
Kind_FunctionExpression 
Kind_FormalParameterList 
Kind_FunctionBody 
Kind_Program 
Kind_SourceElements 
Kind_SourceElement 
Kind_FunctionSourceElement 
Kind_StatementSourceElement 
Kind_DebuggerStatement 

Definition at line 94 of file qscriptast_p.h.

94  {
95  Kind_Node,
109  Kind_Elision,
135  Kind_Block,
161  Kind_Catch,
162  Kind_Finally,
167  Kind_Program,
173  };

Constructors and Destructors

◆ Node()

QScript::AST::Node::Node ( )
inline

◆ ~Node()

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

Definition at line 179 of file qscriptast_p.h.

179 {}

Functions

◆ accept()

void QScript::AST::Node::accept ( Visitor visitor)
inline

Definition at line 185 of file qscriptast_p.h.

Referenced by acceptChild().

186  {
187  if (visitor->preVisit(this)) {
188  accept0(visitor);
189  visitor->postVisit(this);
190  }
191  }
virtual void accept0(Visitor *visitor)=0

◆ accept0()

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

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

◆ acceptChild()

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

Definition at line 193 of file qscriptast_p.h.

Referenced by QScript::AST::ArrayLiteral::accept0(), QScript::AST::ObjectLiteral::accept0(), QScript::AST::ElementList::accept0(), QScript::AST::PropertyNameAndValueList::accept0(), QScript::AST::ArrayMemberExpression::accept0(), QScript::AST::FieldMemberExpression::accept0(), QScript::AST::NewMemberExpression::accept0(), QScript::AST::NewExpression::accept0(), QScript::AST::CallExpression::accept0(), QScript::AST::ArgumentList::accept0(), QScript::AST::PostIncrementExpression::accept0(), QScript::AST::PostDecrementExpression::accept0(), QScript::AST::DeleteExpression::accept0(), QScript::AST::VoidExpression::accept0(), QScript::AST::TypeOfExpression::accept0(), QScript::AST::PreIncrementExpression::accept0(), QScript::AST::PreDecrementExpression::accept0(), QScript::AST::UnaryPlusExpression::accept0(), QScript::AST::UnaryMinusExpression::accept0(), QScript::AST::TildeExpression::accept0(), QScript::AST::NotExpression::accept0(), QScript::AST::BinaryExpression::accept0(), QScript::AST::ConditionalExpression::accept0(), QScript::AST::Expression::accept0(), QScript::AST::Block::accept0(), QScript::AST::StatementList::accept0(), QScript::AST::VariableStatement::accept0(), QScript::AST::VariableDeclaration::accept0(), QScript::AST::VariableDeclarationList::accept0(), QScript::AST::ExpressionStatement::accept0(), QScript::AST::IfStatement::accept0(), QScript::AST::DoWhileStatement::accept0(), QScript::AST::WhileStatement::accept0(), QScript::AST::ForStatement::accept0(), QScript::AST::LocalForStatement::accept0(), QScript::AST::ForEachStatement::accept0(), QScript::AST::LocalForEachStatement::accept0(), QScript::AST::ReturnStatement::accept0(), QScript::AST::WithStatement::accept0(), QScript::AST::SwitchStatement::accept0(), QScript::AST::CaseBlock::accept0(), QScript::AST::CaseClauses::accept0(), QScript::AST::CaseClause::accept0(), QScript::AST::DefaultClause::accept0(), QScript::AST::LabelledStatement::accept0(), QScript::AST::ThrowStatement::accept0(), QScript::AST::TryStatement::accept0(), QScript::AST::Catch::accept0(), QScript::AST::Finally::accept0(), QScript::AST::FunctionExpression::accept0(), QScript::AST::FunctionDeclaration::accept0(), QScript::AST::FunctionBody::accept0(), QScript::AST::Program::accept0(), QScript::AST::SourceElements::accept0(), QScript::AST::FunctionSourceElement::accept0(), and QScript::AST::StatementSourceElement::accept0().

194  {
195  if (node)
196  node->accept(visitor);
197  }

◆ binaryExpressionCast()

BinaryExpression * Node::binaryExpressionCast ( )
virtual

Reimplemented in QScript::AST::BinaryExpression.

Definition at line 37 of file qscriptast.cpp.

38 {
39  return 0;
40 }

◆ expressionCast()

ExpressionNode * Node::expressionCast ( )
virtual

Reimplemented in QScript::AST::ExpressionNode.

Definition at line 32 of file qscriptast.cpp.

33 {
34  return 0;
35 }

◆ statementCast()

Statement * Node::statementCast ( )
virtual

Reimplemented in QScript::AST::Statement.

Definition at line 42 of file qscriptast.cpp.

43 {
44  return 0;
45 }

Properties

◆ endColumn

int QScript::AST::Node::endColumn

Definition at line 204 of file qscriptast_p.h.

◆ endLine

int QScript::AST::Node::endLine

Definition at line 203 of file qscriptast_p.h.

◆ kind

Kind QScript::AST::Node::kind

Definition at line 205 of file qscriptast_p.h.

◆ startColumn

int QScript::AST::Node::startColumn

Definition at line 202 of file qscriptast_p.h.

◆ startLine

int QScript::AST::Node::startLine

Definition at line 201 of file qscriptast_p.h.


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