The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
Statement.cs
Go to the documentation of this file.
1 // -------------------------------------------------------------------------- //
3 // Project rROTOR //
4 // -------------------------------------------------------------------------- //
5 // File: Statement.cs //
6 // Author: Cristina Gonzalez Muņoz - cristi.gm@gmail.com //
7 // Description: //
8 // Abstract class represents a programming language statement. //
9 // Inheritance: AstNode. //
10 // Implements Composite pattern [Composite]. //
11 // Implements Visitor pattern [Element]. //
12 // -------------------------------------------------------------------------- //
13 // Create date: 04-12-2006 //
14 // Modification date: 09-01-2007 //
16 
17 using AST.Operations;
18 using ErrorManagement;
19 
20 namespace AST
21 {
30  public abstract class Statement : AstNode
31  {
32  #region Constructor
33 
40  protected Statement(Location location) : base(location) { }
41 
42  #endregion
43 
44  #region Dispatcher AstOperation
45  public override object AcceptOperation(AstOperation op, object arg) {
53  return op.Exec(this, arg);
54  }
55 
56  #endregion
57  }
58 }
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
This class represent the entry wnen sending a message to an operation object. derived from AstNode ...
Statement(Location location)
Protected constructor of Statement.
Definition: Statement.cs:40
Abstract class for all nodes that compounds the abstract syntax tree.
Definition: AstNode.cs:33
Location location
Location: Encapsulates in one object the line, column and filename
Definition: AstNode.cs:39
override object AcceptOperation(AstOperation op, object arg)
Dispatches expressions to the operation passed as argument. It provokes the execution of op...
Definition: Statement.cs:52