Ejemplo n.º 1
0
 def visitIndexer(self, indexer):
     # Decode the variable name sigil into the actual type
     # The sigils are one of [$%&~]
     indexer.actualType = sigil.identifierToType(indexer.identifier[:-1])
     for index in indexer.indices:
         self.visit(index)
         self.checkAndInsertRValueCast(index, IntegerOwlType())
 def visitAllocateArray(self, statement):
     logger.debug("SymbolTableVisitor.allocateArray")
     statement.symbolTable = self.checkPredecessorsAndRefer(statement)
     symbol_info = SymbolInfo(
         statement.identifier, sigil.identifierToType(statement.identifier), rank=len(statement.dimensions)
     )
     statement.symbolTable.tryAdd(symbol_info)
     self.followSuccessors(statement)
Ejemplo n.º 3
0
 def visitVariable(self, variable):
     # Decode the variable name sigil into the actual type
     # The sigils are one of [$%&~]
     variable.actualType = sigil.identifierToType(variable.identifier)
Ejemplo n.º 4
0
 def visitArray(self, array):
     # Decode the variable name sigil into the actual type
     # The sigils are one of [$%&~]
     array.actualType = sigil.identifierToType(array.identifier)