PL i3PddlmZddlmZddlZddlmZddlmZGddZy))BytesIO)StringION)lexer) parsetreec,eZdZdZdZdZedZy)MessageExtractorTc#Ktj|j|jdj }|j |j Ed{y7w)Nencoding)input_encoding)rLexerreadconfigparse extract_nodes get_children)selffileobj template_nodes V/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/mako/ext/extract.py process_filezMessageExtractor.process_filesQ LLN4;;z+B %' %%m&@&@&BCCCsA#A-%A+&A-c #Kg}d}|jdxsd}ttdtjd|jd}|D]u}d}|r5t |t jr|jjs=t |t jr|jj}|r,|j|j|j||D]A} |j| sd}|j|j|j|Ct |t j r$|j"j$} |j&}n}t |t j(r$|j*j$} |j&}n?t |t j,r$|j$j$} |j&}nt |t j.r|j*j$} nt |t j0r|j2} |j&}nt |t j4r|j6rd}.|j} nft |t j8rd}|j$j$} n3t |t j:r|j$j$} n|r|dd|jd z krg}|D cgc]} | d  } } t | t<r|j>r| jA|d } d} |j>rtCd | z} ntEd | z} |jG| |jd z | D]}|d} | rg}d}|s]|jI|Ed{xycc} w7 w) NFr asciiz\s+z comment-tagsTrbackslashreplace  )%rlistfilterresplit isinstancerTextcontentstripCommenttextextend_split_commentlineno startswithDefTag function_declcodenodesBlockTag body_declCallTagPageTagCallNamespaceTag expression ControlLineisendCode Expressionstr use_bytesencoderrprocess_pythonr)rr/translator_commentsin_translator_commentsr comment_tagsnode child_nodesvalue comment_tagr.commenttranslator_stringsused_translator_commentsmessages rrzMessageExtractor.extract_nodessA !&Z0;G 4&$++n*EF G X ;DK&tY^^4 **,$ 1 12 ))'..++DKK?#/K'' 415.+22 // UC $ 0 01)).."jj D)"4"45~~**"jj D)"3"34yy~~"jj D)"3"34~~**D)"<"<="jj D)"7"78::-2*yyD)..1).&yy~~D)"6"67yy~~$'+A.q@&(#+>"& " "$${{>3EF', $ ~~ut|,t ,..dkkAo'9 0 +/(  0 (&(#%* "--k:::qX ;v":;s,DOH O O BO/OOOcpt|jDcgc] \}}||z|fc}}Scc}}w)zzReturn the multiline comment at lineno split into a list of comment line numbers and the accompanying comment line) enumerate splitlines)r*rEindexlines rr)zMessageExtractor._split_commentzs? )););)=> te^T "   s2N)__name__ __module__ __qualname__r;rr staticmethodr)rrrs(ID `;D  rSr)iorrr makorrrrRrSrrVs" r r rS