summaryrefslogtreecommitdiff
path: root/scripts/strip_local_names.py
blob: 2e14b8e2b35aa4299fe3c25635fa132f095824c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13

'''
Removes local names. When you don't care about local names but do want
to diff for structural changes, this can help.
'''

import sys

for line in open(sys.argv[1]).readlines():
  if '(local.tee ' in line or '(local.set ' in line or '(local.get ' in line:
    print line[:line.find('$')]
  else:
    print line,