Preprocesses the source with all extensions. This is automatically called for all parsing and compiling methods but *not* for :meth:`lex` because there you usually only want the actual source tokenized.
(self, source, name=None, filename=None)
| 514 | self.handle_exception(exc_info, source_hint=source) |
| 515 | |
| 516 | def preprocess(self, source, name=None, filename=None): |
| 517 | """Preprocesses the source with all extensions. This is automatically |
| 518 | called for all parsing and compiling methods but *not* for :meth:`lex` |
| 519 | because there you usually only want the actual source tokenized. |
| 520 | """ |
| 521 | return reduce(lambda s, e: e.preprocess(s, name, filename), |
| 522 | self.iter_extensions(), text_type(source)) |
| 523 | |
| 524 | def _tokenize(self, source, name, filename=None, state=None): |
| 525 | """Called by the parser to do the preprocessing and filtering |
no test coverage detected