MCPcopy Create free account
hub / github.com/ipython/ipython / get_tokens_unprocessed

Method get_tokens_unprocessed

IPython/lib/lexers.py:523–531  ·  view source on GitHub ↗
(self, text)

Source from the content-addressed store, hash-verified

521 self.IPythonConsoleLexer = IPythonConsoleLexer(**options)
522
523 def get_tokens_unprocessed(self, text):
524 # Search for the input prompt anywhere...this allows code blocks to
525 # begin with comments as well.
526 if re.match(r'.*(In \[[0-9]+\]:)', text.strip(), re.DOTALL):
527 lex = self.IPythonConsoleLexer
528 else:
529 lex = self.IPythonLexer
530 for token in lex.get_tokens_unprocessed(text):
531 yield token
532

Callers 1

buffered_tokensMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected