Beispiel #1
0
 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);
 }
Beispiel #2
0
 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();
 }