o ‡ÎÖaã@s*dZddlmZddlmZmZmZmZmZm Z m Z m Z m Z m Z ddlmZddlmZdgZie d“e d“ed“ejd “ed “ejd “e jd “ejd “ejd “ejd “ejd“ejd “ejd“ejd“ejd“ejd “ejd“ede d e j de j!d e j"de j#de j$de jdedi ¥Z%Gdd„deƒZ&dS)zï pygments.formatters.terminal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for terminal output with ANSI sequences. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. é)Ú Formatter) ÚKeywordÚNameÚCommentÚStringÚErrorÚNumberÚOperatorÚGenericÚTokenÚ Whitespace)Ú ansiformat)Úget_choice_optÚTerminalFormatter)Úr)ÚgrayÚ brightblack)ÚcyanÚ brightcyan)ÚblueÚ brightblue)ÚmagentaÚ brightmagenta)ÚgreenÚ brightgreen)Ú_cyan_Ú _brightcyan_)Ú_green_Ú _brightgreen_)rr)ÚredÚ brightred)rr)Úyellowr!)r r )ú**r")z *magenta*z*brightmagenta*)Ú _brightred_r#c@sHeZdZdZdZddgZgZdd„Zdd„Zd d „Z d d „Z d d„Z dS)raÛ Format tokens with ANSI color sequences, for output in a text console. Color sequences are terminated at newlines, so that paging the output works correctly. The `get_style_defs()` method doesn't do anything special since there is no support for common styles. Options accepted: `bg` Set to ``"light"`` or ``"dark"`` depending on the terminal's background (default: ``"light"``). `colorscheme` A dictionary mapping token types to (lightbg, darkbg) color names or ``None`` (default: ``None`` = use builtin colorscheme). `linenos` Set to ``True`` to have line numbers on the terminal output as well (default: ``False`` = no line numbers). ÚTerminalÚterminalÚconsolecKsTtj|fi|¤Žt|dddgdƒdk|_| dd¡pt|_| dd¡|_d|_dS)NÚbgÚlightÚdarkÚ colorschemeÚlinenosFr) rÚ__init__rÚdarkbgÚgetÚTERMINAL_COLORSr*r+Ú_lineno)ÚselfÚoptions©r3ú>/usr/lib/python3/dist-packages/pygments/formatters/terminal.pyr,Ssÿÿ zTerminalFormatter.__init__cCst |||¡S©N)rÚformat)r1Ú tokensourceÚoutfiler3r3r4r6[szTerminalFormatter.formatcCs4|jd7_| d|jdkrdpd|jf¡dS)Néz%s%04d: Ú r)r0Úwrite)r1r8r3r3r4Ú _write_lineno^s&zTerminalFormatter._write_linenocCs8|j |¡}|dur|j}|j |¡}|dus ||jSr5)r*r.Úparentr-)r1ÚttypeÚcolorsr3r3r4Ú _get_colorbs  þ zTerminalFormatter._get_colorc Cs¢|jr| |¡|D]:\}}| |¡}| d¡D]+}|r(| t|| d¡ƒ¡n| | d¡¡| d¡rC|jr>| |¡q| d¡qq |jrO| d¡dSdS)NTr:)r+r<r@Ú splitlinesr;r ÚrstripÚendswith)r1r7r8r>ÚvalueÚcolorÚliner3r3r4Úformat_unencodedls"      €÷ ÿz"TerminalFormatter.format_unencodedN) Ú__name__Ú __module__Ú __qualname__Ú__doc__ÚnameÚaliasesÚ filenamesr,r6r<r@rGr3r3r3r4r8s N)'rKÚpygments.formatterrÚpygments.tokenrrrrrrr r r r Úpygments.consoler Ú pygments.utilrÚ__all__ÚPreprocÚTypeÚWordÚBuiltinÚFunctionÚ NamespaceÚClassÚ ExceptionÚ DecoratorÚVariableÚConstantÚ AttributeÚTagÚDeletedÚInsertedÚHeadingÚ SubheadingÚPromptr/rr3r3r3r4Úsh 0  ÿýüûúùø ÷ ö õ ô óòñðïîã!