CsIfStatement Struct Reference

If statement AST node. More...

Inheritance diagram for CsIfStatement:

CsStatement CsNode List of all members.

Public Member Functions

 CsIfStatement ()
 CsIfStatement (LineInfo line_info)
virtual ~CsIfStatement ()
virtual void build_entities (CsDisplay &display)
 Build Entities - pass 2 (for internal purpose only).
virtual void type_lookup (CsDisplay &display)
 Type Lookup - pass 3 (for internal purpose only).
virtual void member_lookup (CsDisplay &display)
 Member Lookup - pass 4 (for internal purpose only).
virtual void addTokensRecursive (CsTokenCollector &tokenCollector)
 Recusively collect token indexes in source code order.
virtual void addTokens (CsTokenCollector &tokenCollector)
 Collect token indexes associated with this AST node.
virtual void addEntityDefinitions (CsEntityCollector &tokenCollector)
 Collect entities defined in this AST node.
virtual void addEntityReferences (CsEntityCollector &tokenCollector)
 Collect entity references.
virtual void clearEntities ()
 Clear all entity references (for internal purpose only).

Public Attributes

CsExpressioncondition
 Condition expression.
CsStatementif_statement
 If statement.
CsStatementelse_statement
 Else statement.
CsTokenIndex if_token
CsTokenIndex lparen_token
CsTokenIndex rparen_token
CsTokenIndex else_token

Detailed Description

If statement AST node.

EBNF grammar:

if-statement:
  "if" "(" boolean-expression ")" embedded-statement ( "else" embedded-statement )?


Constructor & Destructor Documentation

CsIfStatement::CsIfStatement  )  [inline]
 

CsIfStatement::CsIfStatement LineInfo  line_info  )  [inline, explicit]
 

virtual CsIfStatement::~CsIfStatement  )  [inline, virtual]
 


Member Function Documentation

virtual void CsIfStatement::addEntityDefinitions CsEntityCollector tokenCollector  )  [inline, virtual]
 

Collect entities defined in this AST node.

Implements CsNode.

virtual void CsIfStatement::addEntityReferences CsEntityCollector tokenCollector  )  [inline, virtual]
 

Collect entity references.

Implements CsNode.

virtual void CsIfStatement::addTokens CsTokenCollector tokenCollector  )  [virtual]
 

Collect token indexes associated with this AST node.

Implements CsNode.

virtual void CsIfStatement::addTokensRecursive CsTokenCollector tokenCollector  )  [virtual]
 

Recusively collect token indexes in source code order.

Implements CsNode.

virtual void CsIfStatement::build_entities CsDisplay &  display  )  [virtual]
 

Build Entities - pass 2 (for internal purpose only).

Implements CsNode.

virtual void CsIfStatement::clearEntities  )  [virtual]
 

Clear all entity references (for internal purpose only).

Implements CsNode.

virtual void CsIfStatement::member_lookup CsDisplay &  display  )  [virtual]
 

Member Lookup - pass 4 (for internal purpose only).

Implements CsNode.

virtual void CsIfStatement::type_lookup CsDisplay &  display  )  [virtual]
 

Type Lookup - pass 3 (for internal purpose only).

Implements CsNode.


Member Data Documentation

CsExpression* CsIfStatement::condition
 

Condition expression.

CsStatement* CsIfStatement::else_statement
 

Else statement.

CsTokenIndex CsIfStatement::else_token
 

CsStatement* CsIfStatement::if_statement
 

If statement.

CsTokenIndex CsIfStatement::if_token
 

CsTokenIndex CsIfStatement::lparen_token
 

CsTokenIndex CsIfStatement::rparen_token
 

© 2005 metaspec