%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/python/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/python/__pycache__/htmlizer.cpython-312.pyc |
� Ϫ�f* � � � d Z ddlZddlZddlmZ ddlmZ ddlmZ G d� d� Z G d � d � Z G d� de � Ze fd �Zd� Z edk( r e � yy)z" HTML rendering of Python source. � N)�escape)�List� )�reflectc �2 � e Zd ZdZd\ ZZdxZZdZd� Z d� Z y)�TokenPrinterzU Format a stream of tokens and intermediate whitespace, for pretty-printing. )r r r �utf-8c � � || _ y)zJ @param writer: A file-like object, opened in bytes mode. N)�writer)�selfr s �9/usr/lib/python3/dist-packages/twisted/python/htmlizer.py�__init__zTokenPrinter.__init__ s � � ��� c �b � t t d� r|t j k( r|| _ y t |t � s|j | j � }|\ }}|\ }} | j |k r0| j d|| j z z � |dc| _ | _ | j d|| j z z � | j r d}d| _ np|t j k( r*t j |� rd}nE| j rd}n6d }n3t j j! |� }|�J �|j# � }| j ||� | | _ | xj |j% d� z c_ | j |k7 rd| _ |d v | _ |dk( rd| _ y y )N�ENCODING� r � � identifierr �keyword� parameter�variable)s defs class� :)�hasattr�tokenizer �encoding� isinstance�bytes�encode�currentLiner � currentCol�lastIdentifier� parameters�NAMEr � iskeyword�tok_name�get�lower�count) r �type�token�sCoordinates�eCoordinates�line�srow�scol�erow�ecols r � printtokenzTokenPrinter.printtoken s} � ��8�Z�(�T�X�5F�5F�-F�!�D�M���%��'��L�L����/�E�#���t�#���t����d�"��K�K����(8�(8�!8�9�:�04�a�-�D��d�o����D�D�4�?�?�2�3�4�����D��D�O� �X�]�]� "�� � ��'� ���?�?�&�D�%�D��$�$�(�(��.�D��#�#�#��:�:�<�D����E�4� �������E�K�K��.�.�����t�#��D�O�#�'9�9����D�=��D�O� r N)�__name__� __module__�__qualname__�__doc__r r r! r"