15 using System.Collections.Generic;
19 using ErrorManagement;
20 using TypeSystem.Operations;
33 private Dictionary<string, TypeExpression> table;
58 this.table =
new Dictionary<string, TypeExpression>();
79 #region AddDeclaration()
91 if (!this.table.ContainsKey(name))
93 this.table.Add(name, type);
111 if (this.table.ContainsKey(name))
112 return this.table[name];
void AddDeclaration(string name, TypeExpression type, Location location)
Adds a new declaration into their scope.
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.
Represents a error produced when the declaration already exists.
Implementation of a table of declarations.
Abstract class that represents all different types.
void Reset()
Removes the last information.
TypeExpression SearchType(string name)
Gets the type associated to the declaration name.
DeclarationTable()
Constructor of class DeclarationTable.