python (3.12.0)
̑e" ^ d dl Z ddlmZ ddlmZ ddlmZ G d de Z G d d e Z y)
N )PatternCompiler)pygram)does_tree_importc e Zd Z dZdZdZdZdZ ej d Z
e ZdZ
dZdZdZdZdZej( Zd Zd Zd Zd Zd
ZddZd Zdd
Zd Zd Zd Z y)BaseFixNr postF c B || _ || _ | j y N)optionslogcompile_pattern)selfr
r s F/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/lib2to3/fixer_base.py__init__zBaseFix.__init__/ s# c | j 5t }|j | j d \ | _ | _ y y )NT) with_tree)PATTERNr r patternpattern_tree)r PCs r r zBaseFix.compile_pattern; sJ
<<# "B.0.@.@KO /A /Q+DL$+ $r c || _ y r )filename)r r s r set_filenamezBaseFix.set_filenameF s !
r c L d|i}| j j || xr |S )Nnode)r matchr r resultss r r z
BaseFix.matchM s. 4.||!!$0<W<r c t r )NotImplementedErrorr s r transformzBaseFix.transformY s "##r c |}|| j v r0|t t | j z }|| j v r0| j j | |S r )
used_namesstrnextnumbersadd)r templatenames r new_namezBaseFix.new_namei sW doo%c$t||"455D doo%D!r c | j r/d| _ | j j d| j z | j j | y )NFz### In file %s ###) first_logr appendr )r messages r log_messagezBaseFix.log_messaget s: >>"DNHHOO04==@A r c |j }|j }d|_ d}| j |||fz |r| j | y y )N zLine %d: could not convert: %s)
get_linenocloneprefixr2 )r r reasonlineno
for_outputmsgs r cannot_convertzBaseFix.cannot_convertz s[ "ZZ\
.
334V$ r c R |j }| j d||fz y )NzLine %d: %s)r5 r2 )r r r8 r9 s r warningzBaseFix.warning s- "&&)99:r c |j | _ | j | t j d | _ d| _ y )Nr T)r&