def tokenize(self): self.updated_blocklist = self.block self._check_dictionary_defs() self._checkslice() self._checkbytearray() self._checkloops() self._check_load_attr() self._check_function_kwargs() self._reverselists() ln = None last_token = None for index, instr in enumerate(self.updated_blocklist): if isinstance(instr, Instr): ln = instr.lineno try: token = PyToken(instr, self, index, ln) token.to_vm(self.tokenizer, last_token) except Exception as e: cm = self.container_method print("ERROR: %s:%s in %s() with msg - %s" % (cm.module.path, cm.start_line_no + ln - 1, cm.name, str(e))) last_token = token
def tokenize(self): self.updated_blocklist = self.block self._checkslice() self._checkbytearray() self._checkloops() self._check_load_attr() self._check_function_kwargs() self._reverselists() ln = None last_token = None for index, instr in enumerate(self.updated_blocklist): if isinstance(instr, Instr): ln = instr.lineno token = PyToken(instr, self, index, ln) token.to_vm(self.tokenizer, last_token) last_token = token