Created
April 18, 2017 02:07
-
-
Save milesrout/51fed7a62b7deb42716177149d65b792 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Iterable, Pattern | |
def scanner(src: string, regexes: Iterable[(str, Pattern)]) -> Iterable[(string, string)]: | |
"""Takes source code, and a list of tuples of the form (token_name, | |
token_regex). Yields pairs (token_name, token_literal).""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment