The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
PropertyDefinition.cs
Go to the documentation of this file.
1 // -------------------------------------------------------------------------- //
3 // Project rROTOR //
4 // -------------------------------------------------------------------------- //
5 // File: PropertyDefinition.cs //
6 // Author: Cristina Gonzalez Muņoz - cristi.gm@gmail.com //
7 // Description: //
8 // Encapsulates a property definition. //
9 // Inheritance: IdDeclaration. //
10 // Implements Composite pattern [Composite]. //
11 // Implements Visitor pattern [Concrete Element]. //
12 // -------------------------------------------------------------------------- //
13 // Create date: 12-01-2007 //
14 // Modification date: 01-02-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 namespace AST
25 {
35  {
36  #region Fields
37 
41  private Statement getBlock;
42 
46  private Statement setBlock;
47 
48  #endregion
49 
50  #region Properties
51 
55  public Statement GetBlock
56  {
57  get { return this.getBlock; }
58  }
59 
63  public Statement SetBlock
64  {
65  get { return this.setBlock; }
66  }
67 
68  #endregion
69 
70  #region Constructor
71 
83  : base(id, type, location)
84  {
85  this.getBlock = get;
86  this.setBlock = set;
87  }
88 
89  #endregion
90 
91  #region Accept()
92 
99  public override Object Accept(Visitor v, Object o)
100  {
101  return v.Visit(this, o);
102  }
103 
104  #endregion
105  }
106 }
Statement GetBlock
Gets the statements associated to the get accessor.
override Object Accept(Visitor v, Object o)
Accept method of a concrete visitor.
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
Abstract class represents a programming language statement.
Definition: Statement.cs:30
Encapsulates a identifier expression of our programming language.
PropertyDefinition(SingleIdentifierExpression id, string type, Statement get, Statement set, Location location)
Constructor of Definition.
Encapsulates a declaration.
Location location
Location: Encapsulates in one object the line, column and filename
Definition: AstNode.cs:39
Statement SetBlock
Gets the statements associated to the set accessor.
Encapsulates a property definition.