util.pyc
1 o 2 -��c�D � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ d dl mZm Z m 3 Z 4 d dlmZm Z mZmZmZmZmZmZmZmZmZ d dlmZ erzddlmZ G dd � d e 5 �Zeeef Zejd d 6 krweeeeeef eeef ef Z nej Z dd� Z!G d d� de�"dd��Z#ejdkr�e j$Z%nG dd� d�Z%dNdd�Z&dNdd�Z'ejdkr�dd� Z(ndd� Z(dd� Z)dd� Z*dd � Z+d!d"� ee j,�D �Z-d#d$� Z.d%d"� ee j,�D �Z/d&d"� ee j,�D �h d'�B Z0d(d)� Z1d*d+� Z2d,d-� Z3d.d/� Z4d0d1� Z5d2d3� Z6d4d5� Z7e8� Z9d6d7� Z:d8d9� Z;d:d;� Z<G d<d=� d=e8�Z=ejd d 7 k�r$d>d?� Z>nd@d?� Z>dAdB� Z?dCdD� Z@ejdd 8 � dEk�rOd dFlAmBZB eBddG�dHdI� �ZCdJdK� ZDdS dLdI� ZCdMdK� ZDdS )O� N)�ABCMeta)�Module�expr�AST)�Callable�Dict�Iterable�Iterator�List�Optional�Tuple�Union�cast�Any� TYPE_CHECKING)� iteritems� )�NodeNGc @ s e Zd ZdZdZdZdS )�EnhancedASTNr )�__name__� 9 __module__�__qualname__�first_token� 10 last_token�lineno� r r ��C:\Users\Jacks.GUTTSPC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\asttokens\util.pyr ! s r � c C s dt j| t|��d�f S )zRReturns a human-friendly representation of a token with the given type and string.z%s:%s�u)�token�tok_name�repr�lstrip)�tok_type�stringr r r � 11 token_repr/ s r% c @ s e Zd ZdZdd� ZdS )�Tokena� 12 TokenInfo is an 8-tuple containing the same 5 fields as the tokens produced by the tokenize 13 module, and 3 additional ones useful for this module: 14 15 - [0] .type Token type (see token.py) 16 - [1] .string Token (a string) 17 - [2] .start Starting (row, column) indices of the token (a 2-tuple of ints) 18 - [3] .end Ending (row, column) indices of the token (a 2-tuple of ints) 19 - [4] .line Original line (string) 20 - [5] .index Index of the token in the list of tokens that it belongs to. 21 - [6] .startpos Starting character offset into the input text. 22 - [7] .endpos Ending character offset into the input text. 23 c C s t | j| j�S �N)r% �typer$ ��selfr r r �__str__D s z Token.__str__N)r r r �__doc__r+ r r r r r&