Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _terminal_map(tree):
""" Return a dict containing a map from original token indices
to matched terminals """
tmap = dict()
if tree is not None:
Annotator(tmap).go(tree)
return tmap