MCPcopy Index your code
hub / github.com/nodejs/node / preprocess

Method preprocess

tools/inspector_protocol/jinja2/environment.py:516–522  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 2

babel_extractFunction · 0.95
_tokenizeMethod · 0.95

Calls 2

iter_extensionsMethod · 0.95
reduceFunction · 0.50

Tested by

no test coverage detected