yex.parse.ListSource
yex.parse.ListSource(contents, name=None)
#
Bases: yex.parse.source.Source
A source based on a list. Generally this is a list of strings, although you can use anything you want the tokeniser to find.
Multi-character strings are split into their component characters; any other entries are left as-is. For example, if you passed in
['a', 177, 'b', 'fred', 'c']
"a"177"b""f""r""e""d""c"
Attributes:
| Name | Type | Description |
|---|---|---|
contents |
typing.List[typing.Any]
|
the list. |
Source code in yex/parse/source.py
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | |