File: //lib/python3.9/site-packages/google/protobuf/__pycache__/text_format.cpython-39.pyc
a
x��g� �
@ s& d Z dZddlZddlZddlZddlZddlZddlZddl m
Z
ddl mZ ddlm
Z
ddlmZ ejrreZg d�Ze�� e�� e�� e�� fZe�d ej�Ze�d
ej�Zed�ZdZG d
d� de�Z G dd� de �Z!G dd� de"�Z#dTdd�Z$dd� Z%dd� Z&dUdd�Z'dVdd�Z(dWdd�Z)d d!� Z*d"Z+d#Z,G d$d%� d%e"�Z-dXd&d'�Z.dYd(d)�Z/dZd*d+�Z0d[d,d-�Z1G d.d/� d/e"�Z2d0d1� Z3d2d3� Z4d4d5� Z5d6d7� Z6G d8d9� d9e"�Z7e7Z8d:d;� Z9d<d=� Z:d>d?� Z;d@dA� Z<dBdC� Z=dDdE� Z>d\dFdG�Z?d]dHdI�Z@d^dJdK�ZAd_dLdM�ZBdNdO� ZCdPdQ� ZDdRdS� ZEdS )`ac Contains routines for printing protocol messages in text format.
Simple usage example::
# Create a proto object and serialize it to a text proto string.
message = my_proto_pb2.MyMessage(foo='bar')
text_proto = text_format.MessageToString(message)
# Parse a text proto string.
message = text_format.Parse(text_proto, my_proto_pb2.MyMessage())
z kenton@google.com (Kenton Varda)� N)�decoder)�
type_checkers)�
descriptor)�
text_encoding)�MessageToString�Parse�PrintMessage�
PrintField�PrintFieldValue�Merge�MessageToBytesz-?inf(?:inity)?f?$znanf?$)�'�"zgoogle.protobuf.Anyc @ s e Zd ZdZdS )�Errorz'Top-level module error for text_format.N)�__name__�
__module__�__qualname__�__doc__� r r �?/usr/lib/python3.9/site-packages/google/protobuf/text_format.pyr K s r c s2 e Zd ZdZd � fdd� Zdd� Zdd� Z� ZS )
�
ParseErrorz3Thrown in case of text parsing or tokenizing error.Nc sr |d ur:|d ur:t |�}|d ur.|d�|�7 }d�||�}|d urTtt| ��|� ntt| ��� || _|| _d S )Nz:{0}z {0} : {1})�str�format�superr �__init__�_line�_column)�self�message�line�column�loc�� __class__r r r R s zParseError.__init__c C s | j S �N)r �r r r r �GetLine_ s zParseError.GetLinec C s | j S r$ )r r% r r r � GetColumnb s zParseError.GetColumn)NNN)r r r r r r&