CsConstructor Class Reference

Constructor declaration AST node. More...

Inheritance diagram for CsConstructor:
CsNode

List of all members.

Public Member Functions

 CsConstructor ()
override void replace (CsNode old_node, CsNode new_node)
 Replace CsNode fields.
override CsNode clone (clone_options options)
 Clone AST node.
override void addTokensRecursive (CsTokenCollector tokenCollector)
 Recursively collect token indexes in source code order.
override void addTokens (CsTokenCollector tokenCollector)
 Collect token indexes associated with this AST node.
override void visit (ICsAstVisitor visitor)
 ICsAstVisitor support.
override void callback (ICsAstCallback visitor)
 ICsAstCallback support.
override bool isMethodNode ()
 Returns true if node is method.

Public Attributes

CsAttributes attributes
 Attributes.
CsModifiers modifiers
 Modifiers.
CsIdentifier identifier
 Class name.
CsFormalParameterList parameters
 Constructor formal parameters.
CsTokenType basethis
 One of: tkEOF, tkBASE or tkTHIS.
CsArgumentList argument_list
 Other constructor call arguments.
CsBlock definition
 Constructor method definition.
CsEntityMethod entity
 Constructor method entity.
CsEntityMethod invoked_method
 Invoked method entity.
int lparen_token
int rparen_token
int colon_token
int base_this_token
int base_this_lparen_token
int base_this_rparen_token
int semicolon_token
DcData dc
 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 (  ) 

Member Function Documentation

override void addTokens ( CsTokenCollector  tokenCollector  )  [virtual]

Collect token indexes associated with this AST node.

Implements CsNode.

override void addTokensRecursive ( CsTokenCollector  tokenCollector  )  [virtual]

Recursively collect token indexes in source code order.

Implements CsNode.

override void callback ( ICsAstCallback  visitor  )  [virtual]

ICsAstCallback support.

Implements CsNode.

override CsNode clone ( clone_options  options  )  [virtual]

Clone AST node.

Implements CsNode.

override bool isMethodNode (  )  [virtual]

Returns true if node is method.

Reimplemented from CsNode.

override void replace ( CsNode  old_node,
CsNode  new_node 
) [virtual]

Replace CsNode fields.

Reimplemented from CsNode.

override void visit ( ICsAstVisitor  visitor  )  [virtual]

ICsAstVisitor support.

Implements CsNode.


Member Data Documentation

Other constructor call arguments.

Attributes.

One of: tkEOF, tkBASE or tkTHIS.

Documentation comments.

Constructor method definition.

Constructor method entity.

Class name.

Invoked method entity.

Modifiers.

Constructor formal parameters.

© 2010 metaspec