363d1bb20f
This change is mostly for FB internal organizational reasons. Building is not effected beyond the fact that the target now lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
21 linhas
480 B
Python
21 linhas
480 B
Python
#!/usr/bin/python
|
|
|
|
import re
|
|
import sys
|
|
|
|
regex = re.compile(r'(\w+)::\1(\s*)\((.*)\)(\s*):(\s*)Expression\(EXPRESSION_CONSTRUCTOR_PARAMETER_VALUES\)', re.M | re.S)
|
|
|
|
def fix_file(file):
|
|
global regex
|
|
fp = open(file, 'r')
|
|
contents = fp.read()
|
|
rep = regex.sub(r'\1::\1\2(\3)\4:\5Expression(EXPRESSION_CONSTRUCTOR_PARAMETER_VALUES(\1))',
|
|
contents)
|
|
fp.close()
|
|
fp = open(file, 'w')
|
|
fp.write(rep)
|
|
fp.close()
|
|
|
|
for fname in sys.argv[1:]:
|
|
fix_file(fname)
|