18 using System.Collections.Generic;
23 using ErrorManagement;
42 private List<Statement> declarations;
53 get {
return this.declarations.Count; }
71 this.declarations = decls;
76 #region GetDeclarationElement()
85 return this.declarations[index];
99 for (
int i = 0; i < this.declarations.Count; i++)
102 if (((IdDeclaration)this.declarations[i]).Identifier.Equals(
id))
120 return v.Visit(
this, o);
bool ContainsId(string id)
Searches the identifier and returns true if it exists.
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.
Abstract class represents a programming language statement.
int Count
Gets the number of declarations
Encapsulates a statement with several declarations.
Encapsulates a declaration of a concrete type.
Encapsulates a declaration.
Location location
Location: Encapsulates in one object the line, column and filename
DeclarationSet(string type, List< Statement > decls, Location location)
Constructor of DeclarationSet
override Object Accept(Visitor v, Object o)
Accept method of a concrete visitor.
Statement GetDeclarationElement(int index)
Gets the element stored in the specified index.