CsConstructor Class Reference

Constructor declaration AST node. More...

Inheritance diagram for CsConstructor:

CsNode

List of all members.

Public Member Functions

override void addTokensRecursive (CsTokenCollector tokenCollector)
 Recusively 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)
 CsAstVisitor support.
override void callback (ICsAstCallback visitor)
 CsAstCallback support.

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


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
  ";"

© 2007 metaspec