public void Add(string scopeName, ScopeWithMethods scopeWithMethods) { if (directory.ContainsKey(scopeName)) { ReptileParser.manageException(new Exception("Clase " + scopeName + " ya ha sido definida antes.")); return; } directory.Add(scopeName, scopeWithMethods); }
public MethodSymbol(string name, ClassSymbol returnType, ScopeWithMethods enclosingScope) { this.name = name; this.returnType = returnType; this.enclosingScope = enclosingScope; this.memory = new Memory(START_ADDRESS, MAX_ADDRESS); variables = new Dictionary<string, VariableSymbol>(); parametros = new LinkedList<VariableSymbol>(); localVariables = new LinkedList<VariableSymbol>(); defineThisImplicitParameter(); }