Esempio n. 1
0
 def updateVar(self, id, value, type_):
     """
     Actualiza el valor de una llave en la tabla de simbolos
     """
     if id in self.variables:
         symbol = self.variables[id]
         symbol = sym.Symbol(id, value, type_, symbol.row, symbol.column)
         self.variables[id] = symbol
         return True
Esempio n. 2
0
 def addVar(self, id, value, type_, row, column):
     """
     Inserta un nuevo simbolo en la tabla de simbolos
     """
     env = self
     if id in env.variables:
         return None
     symbol = sym.Symbol(value, type_, row, column)
     env.variables[id] = symbol
     return symbol