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

Abstract class encapsulate a programming language expression. More...

Inheritance diagram for AST.Expression:
AST.Statement AST.AstNode AST.ArgumentExpression AST.BaseCallExpression AST.BaseExpression AST.BinaryExpression AST.BoolLiteralExpression AST.CastExpression AST.CharLiteralExpression AST.CompoundExpression AST.DoubleLiteralExpression AST.FieldAccessExpression AST.IdentifierExpression AST.IntLiteralExpression AST.IsExpression AST.NewArrayExpression AST.NullExpression AST.StringLiteralExpression AST.TernaryExpression AST.ThisExpression AST.UnaryExpression

Public Member Functions

Expression CloneInit ()
 Clones the initialization of the current object. More...
 
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.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
abstract Object Accept (Visitor v, Object o)
 Accept method of a concrete visitor. More...
 
override bool Equals (object obj)
 AntLR compares Nodes with the class name. This is not correct for our purposes. More...
 
override int GetHashCode ()
 

Protected Member Functions

 Expression (Location location)
 Protected constructor of Expresion. More...
 
- 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

TypeExpression frozenTypeExpression
 WriteType variable may change its type's substitution (e.g., field type variables) This attribute saves the type in an specific time (frozen). If this type's substitution changes, the frozen type does not. More...
 
- Protected Attributes inherited from AST.AstNode
Location location
 Location: Encapsulates in one object the line, column and filename More...
 

Properties

TypeExpression ExpressionType [get, set]
 Gets or sets the type of the expression. More...
 
bool Lvalue [get, set]
 Gets or sets the lvalue. More...
 
bool LeftExpression [get, set]
 Gets or sets true if the expression is allocated in the left part of an assignment, false otherwise. More...
 
virtual TypeExpression ILTypeExpression [get]
 Gets the type expression to use in code generation. More...
 
- Properties inherited from AST.AstNode
Location Location [get]
 

Detailed Description

Abstract class encapsulate a programming language expression.

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

Definition at line 37 of file Expression.cs.

Constructor & Destructor Documentation

AST.Expression.Expression ( Location  location)
protected

Protected constructor of Expresion.

Parameters
fileNameFile name.
lineNumberLine number.
columnNumberColumn number.

Definition at line 118 of file Expression.cs.

Member Function Documentation

override object AST.Expression.AcceptOperation ( AstOperation  op,
object  arg 
)
virtual

Dispatches expressions to the operation passed as argument. It provokes the execution of op.AcceptOperation(AstNode) with the parameter resolved polymorfically

Parameters
opAstOperation to dispatch
Returns

Reimplemented from AST.AstNode.

Reimplemented in AST.SingleIdentifierExpression, AST.NewArrayExpression, AST.FieldAccessExpression, AST.NewExpression, AST.InvocationExpression, and AST.IdentifierExpression.

Definition at line 145 of file Expression.cs.

Expression AST.Expression.CloneInit ( )

Clones the initialization of the current object.

Returns
The reference of the cloned object.

Definition at line 130 of file Expression.cs.

Member Data Documentation

TypeExpression AST.Expression.frozenTypeExpression
protected

WriteType variable may change its type's substitution (e.g., field type variables) This attribute saves the type in an specific time (frozen). If this type's substitution changes, the frozen type does not.

Definition at line 61 of file Expression.cs.

Property Documentation

TypeExpression AST.Expression.ExpressionType
getset

Gets or sets the type of the expression.

Definition at line 71 of file Expression.cs.

virtual TypeExpression AST.Expression.ILTypeExpression
get

Gets the type expression to use in code generation.

Definition at line 98 of file Expression.cs.

bool AST.Expression.LeftExpression
getset

Gets or sets true if the expression is allocated in the left part of an assignment, false otherwise.

Definition at line 89 of file Expression.cs.

bool AST.Expression.Lvalue
getset

Gets or sets the lvalue.

Definition at line 80 of file Expression.cs.


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