The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
InvocationExpression.cs
Go to the documentation of this file.
1 // -------------------------------------------------------------------------- //
3 // Project rROTOR //
4 // -------------------------------------------------------------------------- //
5 // File: InvocationExpression.cs //
6 // Author: Cristina Gonzalez Muņoz - cristi.gm@gmail.com //
7 // Description: //
8 // Encapsulates a invocation expression. //
9 // Inheritance: BaseCallExpression. //
10 // Implements Composite pattern [Composite]. //
11 // Implements Visitor pattern [Concrete Element]. //
12 // -------------------------------------------------------------------------- //
13 // Create date: 07-12-2006 //
14 // Modification date: 25-04-2007 //
16 
17 using System;
18 using System.Collections.Generic;
19 using System.Text;
20 
21 using Tools;
22 using TypeSystem;
23 using ErrorManagement;
24 using AST.Operations;
25 using TypeSystem.Operations;
26 
27 namespace AST
28 {
38  {
39  #region Fields
40 
44  private Expression identifier;
45 
46  #endregion
47 
48  #region Properties
49  public Expression Identifier
53  {
54  get { return this.identifier; }
55  set { this.identifier = value; }
56  }
57 
64  get { return this.frozenTypeExpression; }
65  set { this.frozenTypeExpression = value; }
66  }
67  #endregion
68 
69  #region Constructor
70 
80  : base(arguments, location) {
81  this.identifier = identifier;
82  }
83 
84  #endregion
85 
86  #region Accept()
87 
94  public override Object Accept(Visitor v, Object o) {
95  return v.Visit(this, o);
96  }
97 
98  #endregion
99 
100  #region Dispatcher AstOperation
101  public override object AcceptOperation(AstOperation op, object arg) {
109  return op.Exec(this, arg);
110  }
111 
112  #endregion
113  }
114 }
Expression Identifier
Gets the expression to invoke
Abstract class encapsulate a programming language expression.
Definition: Expression.cs:37
Encapsulates a invocation expression.
Abstract class to define different visits over the abstract syntax tree.
Definition: Visitor.cs:29
This class encapsulates a location in a specific file. Implements an Inmutable pattern. So it can be used in any context, that is his internal fields never change.
Definition: Location.cs:24
This class represent the entry wnen sending a message to an operation object. derived from AstNode ...
Abstract class that represents all different types.
override object AcceptOperation(AstOperation op, object arg)
Dispatches expressions to the operation passed as argument. It provokes the execution of op...
Encapsulates a set of expressions.
override Object Accept(Visitor v, Object o)
Accept method of a concrete visitor.
Location location
Location: Encapsulates in one object the line, column and filename
Definition: AstNode.cs:39
TypeExpression FrozenTypeExpression
WriteType variable may change its type's substitution (e.g., field type variables) This attribute sav...
InvocationExpression(Expression identifier, CompoundExpression arguments, Location location)
Constructor of InvocationExpression
Encapsulates a invocation expression to base class.