| Server IP : 35.80.110.71 / Your IP : 216.73.216.221 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/parso/__pycache__/ |
Upload File : |
�
̑�a � � � d Z ddlmZmZ ddlmZ ddlmZ G d� de� Z G d� de� Z
G d � d
e� Z G d� d� Z
d
� Z G d� d� Zy)a�
The ``Parser`` tries to convert the available Python code in an easy to read
format, something like an abstract syntax tree. The classes who represent this
tree, are sitting in the :mod:`parso.tree` module.
The Python module ``tokenize`` is a very important part in the ``Parser``,
because it splits the code into different words (tokens). Sometimes it looks a
bit messy. Sorry for that! You might ask now: "Why didn't you use the ``ast``
module for this? Well, ``ast`` does a very good job understanding proper Python
code, but fails to work as soon as there's a single line of broken code.
There's one important optimization that needs to be known: Statements are not
being parsed completely. ``Statement`` is just a representation of the tokens
within the statement. This lowers memory usage and cpu time and reduces the
complexity of the ``Parser`` (there's another parser sitting inside
``Statement``, which produces ``Array`` and ``Call``).
� )�Dict�Type)�tree)�ReservedStringc � � e Zd ZdZd� Zy)�ParserSyntaxErrorz_
Contains error information about the parser tree.
May be raised as an exception.
c � � || _ || _ y �N)�message�
error_leaf)�selfr r s �./usr/lib/python3/dist-packages/parso/parser.py�__init__zParserSyntaxError.__init__&