Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
scanner.cpython-313.pyc64 linesDownload Raw Back to __pycache__
1�

2�j��:�SrSSKr"SS\5r"SS5rg)a�3pygments.scanner4~~~~~~~~~~~~~~~~5 6This library implements a regex based scanner. Some languages7like Pascal are easy to parse but have some keywords that8depend on the context. Because of this it's impossible to lex9that just by using a regular expression lexer like the10`RegexLexer`.11 12Have a look at the `DelphiLexer` to get an idea of how to use13this scanner.14 15:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.16:license: BSD, see LICENSE for details.17�Nc��\rSrSrSrSrg)�	EndOfText�zN18Raise if end of text is reached and the user19tried to call a match function.20�N)�__name__�21__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r��VD:\code\apps\devtools\python\user_packages\Python313\site-packages\pygments/scanner.pyrrs��r
rc�l�\rSrSrSrSSjrSr\"\\R5rSrSr	Sr22SrS	rS23r
g)
�Scanner�z`24Simple scanner25 26All method patterns are regular expression strings (not27compiled expressions!)28c��Xl[U5UlSUlSUlX lSUlSUl0Ulg)zc29:param text:    The text which should be scanned30:param flags:   default regular expression flags31rN)	�data�len�data_length�	start_pos�pos�flags�last�match�	_re_cache)�self�textrs   r�__init__�Scanner.__init__#s=��32�	��t�9����������33���	���34���r
c�4�URUR:�$)z.`True` if the scanner reached the end of text.)rr�rs r�eos�Scanner.eos1s���x�x�4�+�+�+�+r
c��UR(a35[5eXR;a-[R"XR365URU'URUR
URUR5$)zs37Apply `pattern` on the current position and return38the match object. (Doesn't touch pos). Use this for39lookahead.40)	r"rr�re�compilerrrr�r�patterns  r�check�
Scanner.check6s\���8�8��+���.�.�(�&(�j�j��*�*�&E�D�N�N�7�#��~�~�g�&�,�,�T�Y�Y����A�Ar
c�(�URU5SL$)zTApply a pattern on the current position and check41if it patches. Doesn't touch pos.42N)r)r's  r�test�Scanner.testBs���z�z�'�"�$�.�.r
c���UR(a43[5eXR;a-[R"XR445URU'URUlURUR
URUR5nUcgUR5UlUR5Ul	UR5Ulg)a]45Scan the text for the given pattern and update pos/match46and related fields. The return value is a boolean that47indicates if the pattern matched. The matched value is48stored on the instance as ``match``, the last value is49stored as ``last``. ``start_pos`` is the position of the50pointer before the pattern was matched, ``pos`` is the51end position.52FT)r"rrr%r&rrrrr�startr�end�group)rr(�ms   r�scan�Scanner.scanHs����8�8��+���.�.�(�&(�j�j��*�*�&E�D�N�N�7�#��J�J��	��N�N�7�#�)�)�$�)�)�T�X�X�>���9���������5�5�7����W�W�Y��53�r
c�&�URS5 g)zScan exactly one char.�.N)r3r!s r�get_char�Scanner.get_char_s
���	�	�#�r
c�b�SURRURUR4-$)Nz54<%s %d/%d>)�	__class__rrrr!s r�__repr__�Scanner.__repr__cs1����N�N�#�#��H�H����55�56�	57r
)rrrrrrrrN)r)rrr	r58rrr"�propertyr)r,r3r7r;rrr
rrrs=����,��3����59$�C�60B�/��.�61r
r)rr%�RuntimeErrorrrrr
r�<module>r?s'��� 62����M63�M64r
codekingpro/portable-devtools · Team Ai