Files
tamigo-cli/venv/lib/python3.12/site-packages/pygments/__pycache__/scanner.cpython-312.pyc

76 lines
4.6 KiB
Plaintext
Raw Normal View History

<EFBFBD>
<00><16>i <00><00>:<00>dZddlZGd<03>de<02>ZGd<05>d<06>Zy)a
pygments.scanner
~~~~~~~~~~~~~~~~
This library implements a regex based scanner. Some languages
like Pascal are easy to parse but have some keywords that
depend on the context. Because of this it's impossible to lex
that just by using a regular expression lexer like the
`RegexLexer`.
Have a look at the `DelphiLexer` to get an idea of how to use
this scanner.
:copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
<EFBFBD>Nc<00><00>eZdZdZy)<03> EndOfTextzZ
Raise if end of text is reached and the user
tried to call a match function.
N)<04>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__<5F><00><00>V/home/daniel/Projects/tamigo-cli/venv/lib/python3.12/site-packages/pygments/scanner.pyrrs<00><00>r
rc<00>b<00>eZdZdZd
d<02>Zd<03>Zeeej<00>Zd<04>Zd<05>Zd<06>Z d<07>Z
d<08>Z y ) <0B>Scannerzp
Simple scanner
All method patterns are regular expression strings (not
compiled expressions!)
c<00><><00>||_t|<01>|_d|_d|_||_d|_d|_i|_y)z{
:param text: The text which should be scanned
:param flags: default regular expression flags
rN) <09>data<74>len<65> data_length<74> start_pos<6F>pos<6F>flags<67>last<73>match<63> _re_cache)<03>self<6C>textrs r <00>__init__zScanner.__init__#sA<00><00>
<19><04> <09><1E>t<EFBFBD>9<EFBFBD><04><18><1A><04><0E><14><04><08><1A><04>
<EFBFBD><18><04> <09><19><04>
<EFBFBD><1B><04>r
c<00>4<00>|j|jk\S)z.`True` if the scanner reached the end of text.)rr<00>rs r <00>eosz Scanner.eos1s<00><00><13>x<EFBFBD>x<EFBFBD>4<EFBFBD>+<2B>+<2B>+<2B>+r
c<00>
<00>|jr
t<00><00>||jvr-tj||j
<00>|j|<|j|j |j|j<00>S)z<>
Apply `pattern` on the current position and return
the match object. (Doesn't touch pos). Use this for
lookahead.
) rrr<00>re<72>compilerrrr<00>r<00>patterns r <00>checkz Scanner.check6s`<00><00> <10>8<EFBFBD>8<EFBFBD><1B>+<2B> <1D> <12>$<24>.<2E>.<2E> (<28>&(<28>j<EFBFBD>j<EFBFBD><17>$<24>*<2A>*<2A>&E<>D<EFBFBD>N<EFBFBD>N<EFBFBD>7<EFBFBD> #<23><13>~<7E>~<7E>g<EFBFBD>&<26>,<2C>,<2C>T<EFBFBD>Y<EFBFBD>Y<EFBFBD><04><08><08>A<>Ar
c<00>(<00>|j|<01>duS)zdApply a pattern on the current position and check
if it patches. Doesn't touch pos.
N)r#r!s r <00>testz Scanner.testBs<00><00><14>z<EFBFBD>z<EFBFBD>'<27>"<22>$<24>.<2E>.r
c<00><><00>|jr
t<00><00>||jvr-tj||j
<00>|j|<|j |_|j|j |j|j<00>}|<02>y|j<00>|_ |j<00>|_ |j<00>|_y)a<>
Scan the text for the given pattern and update pos/match
and related fields. The return value is a boolean that
indicates if the pattern matched. The matched value is
stored on the instance as ``match``, the last value is
stored as ``last``. ``start_pos`` is the position of the
pointer before the pattern was matched, ``pos`` is the
end position.
FT)rrrrr rrrrr<00>startr<00>end<6E>group)rr"<00>ms r <00>scanz Scanner.scanHs<><00><00> <10>8<EFBFBD>8<EFBFBD><1B>+<2B> <1D> <12>$<24>.<2E>.<2E> (<28>&(<28>j<EFBFBD>j<EFBFBD><17>$<24>*<2A>*<2A>&E<>D<EFBFBD>N<EFBFBD>N<EFBFBD>7<EFBFBD> #<23><18>J<EFBFBD>J<EFBFBD><04> <09> <10>N<EFBFBD>N<EFBFBD>7<EFBFBD> #<23> )<29> )<29>$<24>)<29>)<29>T<EFBFBD>X<EFBFBD>X<EFBFBD> ><3E><01> <0C>9<EFBFBD><18><1A><17><17><19><04><0E><14>5<EFBFBD>5<EFBFBD>7<EFBFBD><04><08><16>W<EFBFBD>W<EFBFBD>Y<EFBFBD><04>
<EFBFBD>r
c<00>&<00>|jd<01>y)zScan exactly one char.<2E>.N)r+rs r <00>get_charzScanner.get_char_s <00><00> <0C> <09> <09>#<23>r
c<00>b<00>d|jj|j|jfzS)Nz
<%s %d/%d>)<04> __class__rrrrs r <00>__repr__zScanner.__repr__cs1<00><00><1B> <10>N<EFBFBD>N<EFBFBD> #<23> #<23> <10>H<EFBFBD>H<EFBFBD> <10> <1C> <1C>
<EFBFBD>
<EFBFBD>
r
N)r) rrrrrr<00>propertyr#r%r+r.r1r r
r r r s=<00><00><08> <1C>,<2C> <13>3<EFBFBD><03> <0B> <0B>
$<24>C<EFBFBD>
B<01>/<2F> <14>.<17>
r
r )rr<00> RuntimeErrorrr r r
r <00><module>r4s'<00><01><04> 
<EFBFBD><08> <0C><08>M
<EFBFBD>M
r