The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
AST.SwitchLabel Class Reference

Encapsulates a switch label (Case + condition or Default section). More...

Inheritance diagram for AST.SwitchLabel:
AST.Statement AST.AstNode

Public Member Functions

 SwitchLabel (Expression cond, Location location)
 Constructor of SwitchLabel More...
 
 SwitchLabel (Location location)
 Constructor of SwitchLabel More...
 
override Object Accept (Visitor v, Object o)
 Accept method of a concrete visitor. More...
 
- Public Member Functions inherited from AST.Statement
override object AcceptOperation (AstOperation op, object arg)
 Dispatches expressions to the operation passed as argument. It provokes the execution of op.AcceptOperation(AstNode) with the parameter resolved polymorfically More...
 
- Public Member Functions inherited from AST.AstNode
override bool Equals (object obj)
 AntLR compares Nodes with the class name. This is not correct for our purposes. More...
 
override int GetHashCode ()
 

Properties

Expression Condition [get]
 Gets the condition expression of Case statement. More...
 
SectionType SwitchSectionType [get]
 Gets the type of the Case statement (case or default) More...
 
- Properties inherited from AST.AstNode
Location Location [get]
 

Additional Inherited Members

- Protected Member Functions inherited from AST.Statement
 Statement (Location location)
 Protected constructor of Statement. More...
 
- Protected Member Functions inherited from AST.AstNode
 AstNode (Location location)
 Protected constructor of NodeAst More...
 
- Protected Attributes inherited from AST.AstNode
Location location
 Location: Encapsulates in one object the line, column and filename More...
 

Detailed Description

Encapsulates a switch label (Case + condition or Default section).

Inheritance: Statement. Implements Composite pattern [Composite]. Implements Visitor pattern [Concrete Element].

Definition at line 47 of file SwitchLabel.cs.

Constructor & Destructor Documentation

AST.SwitchLabel.SwitchLabel ( Expression  cond,
Location  location 
)

Constructor of SwitchLabel

Parameters
condCondition expression of the Case statement.
fileNameFile name.
lineNumberLine number.
columnNumberColumn number.

Definition at line 92 of file SwitchLabel.cs.

AST.SwitchLabel.SwitchLabel ( Location  location)

Constructor of SwitchLabel

Parameters
fileNameFile name.
lineNumberLine number.
columnNumberColumn number.

Definition at line 105 of file SwitchLabel.cs.

Member Function Documentation

override Object AST.SwitchLabel.Accept ( Visitor  v,
Object  o 
)
virtual

Accept method of a concrete visitor.

Parameters
vConcrete visitor
oOptional information to use in the visit.
Returns
Optional information to return

Implements AST.AstNode.

Definition at line 121 of file SwitchLabel.cs.

Property Documentation

Expression AST.SwitchLabel.Condition
get

Gets the condition expression of Case statement.

Definition at line 69 of file SwitchLabel.cs.

SectionType AST.SwitchLabel.SwitchSectionType
get

Gets the type of the Case statement (case or default)

Definition at line 77 of file SwitchLabel.cs.


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