def token_load(self, line_number, tokens):
        self.line_number = line_number
        assert tokens[-1] == 0x00, "line code %s doesn't ends with \\x00: %s" % (
            repr(tokens), repr(tokens[-1])
        )

        """
        NOTE: The BASIC interpreter changed REM shortcut and ELSE
        internaly:
           "'" <-> ":'"
        "ELSE" <-> ":ELSE"

        See also:
        http://archive.worldofdragon.org/phpBB3/viewtopic.php?f=8&t=4310&p=11632#p11630
        """
        for src, dst in self.tokens_replace_rules:
            log.info("Relace tokens %s with $%02x",
                pformat_byte_hex_list(src), dst
            )
            log.debug("Before..: %s", pformat_byte_hex_list(tokens))
            tokens = list_replace(tokens, src, dst)
            log.debug("After...: %s", pformat_byte_hex_list(tokens))

        self.line_code = tokens[:-1]
def token_load ( self , line_number , tokens ) : self . line_number = line_number assert tokens [ - 1 ] == 0x00 , "line code %s doesn't ends with \\x00: %s" % ( repr ( tokens ) , repr ( tokens [ - 1 ] ) ) """
        NOTE: The BASIC interpreter changed REM shortcut and ELSE
        internaly:
           "'" <-> ":'"
        "ELSE" <-> ":ELSE"
        See also:
        http://archive.worldofdragon.org/phpBB3/viewtopic.php?f=8&t=4310&p=11632#p11630
        """ for src , dst in self . tokens_replace_rules : log . info ( "Relace tokens %s with $%02x" , pformat_byte_hex_list ( src ) , dst ) log . debug ( "Before..: %s" , pformat_byte_hex_list ( tokens ) ) tokens = list_replace ( tokens , src , dst ) log . debug ( "After...: %s" , pformat_byte_hex_list ( tokens ) ) self . line_code = tokens [ : - 1 ]
NOTE: The BASIC interpreter changed REM shortcut and ELSE
        internaly:
           "'" <-> ":'"
        "ELSE" <-> ":ELSE"

        See also:
        http://archive.worldofdragon.org/phpBB3/viewtopic.php?f=8&t=4310&p=11632#p11630