|
|
| data |
| |
|
| data_length |
| |
|
| start_pos |
| |
|
| pos |
| |
|
| flags |
| |
|
| last |
| |
|
| match |
| |
|
|
| eos = property(eos, eos.__doc__) |
| |
Simple scanner
All method patterns are regular expression strings (not
compiled expressions!)
◆ __init__()
| pip._vendor.pygments.scanner.Scanner.__init__ |
( |
|
self, |
|
|
|
text, |
|
|
|
flags = 0 |
|
) |
| |
:param text: The text which should be scanned
:param flags: default regular expression flags
◆ check()
| pip._vendor.pygments.scanner.Scanner.check |
( |
|
self, |
|
|
|
pattern |
|
) |
| |
Apply `pattern` on the current position and return
the match object. (Doesn't touch pos). Use this for
lookahead.
◆ eos()
| pip._vendor.pygments.scanner.Scanner.eos |
( |
|
self | ) |
|
`True` if the scanner reached the end of text.
◆ get_char()
| pip._vendor.pygments.scanner.Scanner.get_char |
( |
|
self | ) |
|
◆ scan()
| pip._vendor.pygments.scanner.Scanner.scan |
( |
|
self, |
|
|
|
pattern |
|
) |
| |
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.
◆ test()
| pip._vendor.pygments.scanner.Scanner.test |
( |
|
self, |
|
|
|
pattern |
|
) |
| |
Apply a pattern on the current position and check
if it patches. Doesn't touch pos.
The documentation for this class was generated from the following file:
- docs/help/help-venv/lib/python3.12/site-packages/pip/_vendor/pygments/scanner.py