matchcompiler: pep8 fixes
This commit is contained in:
parent
7ef74924e1
commit
80be769912
|
@ -123,7 +123,7 @@ class MatchCompiler:
|
||||||
elif tok == '%varid%':
|
elif tok == '%varid%':
|
||||||
return '(tok->isName() && tok->varId()==varid)'
|
return '(tok->isName() && tok->varId()==varid)'
|
||||||
elif (len(tok) > 2) and (tok[0] == "%"):
|
elif (len(tok) > 2) and (tok[0] == "%"):
|
||||||
print ("unhandled:" + tok)
|
print("unhandled:" + tok)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
'(tok->str()==' + self._insertMatchStr(tok) + ')/* ' + tok + ' */'
|
'(tok->str()==' + self._insertMatchStr(tok) + ')/* ' + tok + ' */'
|
||||||
|
@ -524,8 +524,8 @@ class MatchCompiler:
|
||||||
break
|
break
|
||||||
|
|
||||||
assert(len(res) >= 3 or len(res) < 6)
|
assert(len(res) >= 3 or len(res) < 6)
|
||||||
# assert that Token::find(simple)match has either 2, 3 or
|
# assert that Token::find(simple)match has either 2, 3 or
|
||||||
# four arguments
|
# four arguments
|
||||||
|
|
||||||
g0 = res[0]
|
g0 = res[0]
|
||||||
tok = res[1]
|
tok = res[1]
|
||||||
|
@ -664,7 +664,7 @@ def main():
|
||||||
|
|
||||||
# convert all lib/*.cpp files
|
# convert all lib/*.cpp files
|
||||||
for f in glob.glob('lib/*.cpp'):
|
for f in glob.glob('lib/*.cpp'):
|
||||||
print (f + ' => ' + build_dir + '/' + f[4:])
|
print(f + ' => ' + build_dir + '/' + f[4:])
|
||||||
mc.convertFile(f, build_dir + '/' + f[4:])
|
mc.convertFile(f, build_dir + '/' + f[4:])
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in New Issue