The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
IdentifierExpression.cs
Go to the documentation of this file.
1 // -------------------------------------------------------------------------- //
3 // Project rROTOR //
4 // -------------------------------------------------------------------------- //
5 // File: IdentifierExpression.cs //
6 // Author: Cristina Gonzalez Muņoz - cristi.gm@gmail.com //
7 // Description: //
8 // Encapsulates a name expression of our programming language. //
9 // Inheritance: Expression. //
10 // Implements Composite pattern [Leaf]. //
11 // Implements Visitor pattern [Concrete Element]. //
12 // -------------------------------------------------------------------------- //
13 // Create date: 05-12-2006 //
14 // Modification date: 30-04-2007 //
16 
17 using System;
18 using System.Collections.Generic;
19 using System.Text;
20 
21 using Tools;
22 using ErrorManagement;
23 using AST.Operations;
24 
25 namespace AST
26 {
35  public abstract class IdentifierExpression : Expression
36  {
37  #region Fields
38 
42  private string id;
43 
44  #endregion
45 
46  #region Properties
47 
51  public string Identifier
52  {
53  get { return id; }
54  set { this.id = value; }
55  }
56 
57  #endregion
58 
59  #region Constructor
60 
68  : base(location)
69  {
70  }
71 
72  #endregion
73  #region Dispatcher AstOperation
74  public override object AcceptOperation(AstOperation op, object arg) {
82  return op.Exec(this, arg);
83  }
84 
85  #endregion
86  }
87 }
Abstract class encapsulate a programming language expression.
Definition: Expression.cs:37
Encapsulates a name expression of our programming language.
override object AcceptOperation(AstOperation op, object arg)
Dispatches expressions to the operation passed as argument. It provokes the execution of op...
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 ...
IdentifierExpression(Location location)
Constructor of IdentifierExpression
Location location
Location: Encapsulates in one object the line, column and filename
Definition: AstNode.cs:39
string Identifier
Gets the name name.