CsConstructor Struct Reference

Constructor declaration AST node. More...

Inheritance diagram for CsConstructor:
CsNode

List of all members.

Public Member Functions

 CsConstructor ()
 CsConstructor (LineInfo line_info)
virtual ~CsConstructor ()
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 clearEntities ()
 Clear all entity references (for internal purpose only).
virtual void addTokensRecursive (CsTokenCollector &tokenCollector)
 Recursively 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 visit (CsAstVisitor *visitor)
 CsAstVisitor support.
virtual void callback (CsAstCallback *visitor)
 CsAstCallback support.

Public Attributes

CsAttributesattributes
 Attributes.
CsModifiers modifiers
 Modifiers.
CsIdentifier identifier
 Class name.
CsFormalParameterListparameters
 Constructor formal parameters.
CsTokenType basethis
 One of: tkEOF, tkBASE or tkTHIS.
CsArgumentListargument_list
 Other constructor call arguments.
CsBlockdefinition
 Constructor method definition.
CsEntityMethodentity
 Constructor method entity.
CsEntityMethodinvoked_method
 Invoked method entity.
CsTokenIndex lparen_token
CsTokenIndex rparen_token
CsTokenIndex colon_token
CsTokenIndex base_this_token
CsTokenIndex base_this_lparen_token
CsTokenIndex base_this_rparen_token
CsTokenIndex semicolon_token
DcDatadc
 Documentation comments.

Detailed Description

Constructor declaration AST node.

EBNF grammar:

constructor-declaration:
  (attributes)? (constructor-modifiers)? constructor-declarator constructor-body

constructor-modifiers:
  (constructor-modifier)+

constructor-modifier:
  "public"
  "protected"
  "internal"
  "private"
  "extern"

constructor-declarator:
  identifier "(" (formal-parameter-list)? ")" (constructor-initializer)?

constructor-initializer:
  ":" base "(" (argument-list)? ")"
  ":" this "(" (argument-list)? ")"

constructor-body:
  block
  ";"


Constructor & Destructor Documentation

CsConstructor::CsConstructor (  )  [inline]
CsConstructor::CsConstructor ( LineInfo  line_info  )  [inline, explicit]
virtual CsConstructor::~CsConstructor (  )  [inline, virtual]

Member Function Documentation

virtual void CsConstructor::addEntityDefinitions ( CsEntityCollector tokenCollector  )  [virtual]

Collect entities defined in this AST node.

Implements CsNode.

virtual void CsConstructor::addEntityReferences ( CsEntityCollector tokenCollector  )  [virtual]

Collect entity references.

Implements CsNode.

virtual void CsConstructor::addTokens ( CsTokenCollector tokenCollector  )  [virtual]

Collect token indexes associated with this AST node.

Implements CsNode.

virtual void CsConstructor::addTokensRecursive ( CsTokenCollector tokenCollector  )  [virtual]

Recursively collect token indexes in source code order.

Implements CsNode.

virtual void CsConstructor::build_entities ( CsDisplay &  display  )  [virtual]

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

Implements CsNode.

virtual void CsConstructor::callback ( CsAstCallback visitor  )  [inline, virtual]

CsAstCallback support.

Implements CsNode.

virtual void CsConstructor::clearEntities (  )  [virtual]

Clear all entity references (for internal purpose only).

Implements CsNode.

virtual void CsConstructor::member_lookup ( CsDisplay &  display  )  [virtual]

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

Implements CsNode.

virtual void CsConstructor::type_lookup ( CsDisplay &  display  )  [virtual]

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

Implements CsNode.

virtual void CsConstructor::visit ( CsAstVisitor visitor  )  [inline, virtual]

CsAstVisitor support.

Implements CsNode.


Member Data Documentation

Other constructor call arguments.

One of: tkEOF, tkBASE or tkTHIS.

Documentation comments.

Constructor method definition.

Constructor method entity.

Constructor formal parameters.

© 2010 metaspec