Guest User

Untitled

a guest
Jan 19th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. idents = [m.span() for m in re.finditer(identifier_regexp, source)]
  2. strings = [m.span() for m in re.finditer(string_regexp, source)]
  3. idents = [(i,j) for (i,j) in idents if source[i:j] not in reserved_identifiers]
  4. idents = [(i,j) for (i,j) in idents if all([i<m or j>n for (m,n) in strings])]
Add Comment
Please, Sign In to add comment