mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Minor fixes (remove deprecated .message, delete a variable at the right point, delete another variable)
This commit is contained in:
parent
d8629f9200
commit
8ca88013a8
1 changed files with 5 additions and 3 deletions
8
main.py
8
main.py
|
@ -453,7 +453,7 @@ def main():
|
||||||
# need the result.
|
# need the result.
|
||||||
UniConvScript(script).to_unicode()
|
UniConvScript(script).to_unicode()
|
||||||
except EParse as e:
|
except EParse as e:
|
||||||
sys.stderr.write(e.message + '\n')
|
sys.stderr.write(e[0] + '\n')
|
||||||
return 1
|
return 1
|
||||||
script = PreparePreproc(script)
|
script = PreparePreproc(script)
|
||||||
if mcpp_mode:
|
if mcpp_mode:
|
||||||
|
@ -497,9 +497,10 @@ def main():
|
||||||
try:
|
try:
|
||||||
ts = p.parse(script, options)
|
ts = p.parse(script, options)
|
||||||
except EParse as e:
|
except EParse as e:
|
||||||
sys.stderr.write(e.message + '\n')
|
sys.stderr.write(e[0] + '\n')
|
||||||
return 1
|
return 1
|
||||||
del p
|
del p
|
||||||
|
del script
|
||||||
|
|
||||||
opt = optimizer()
|
opt = optimizer()
|
||||||
ts = opt.optimize(ts, options)
|
ts = opt.optimize(ts, options)
|
||||||
|
@ -509,7 +510,8 @@ def main():
|
||||||
script = script_header + outs.output(ts, options)
|
script = script_header + outs.output(ts, options)
|
||||||
del outs
|
del outs
|
||||||
del ts
|
del ts
|
||||||
del script_header
|
|
||||||
|
del script_header
|
||||||
|
|
||||||
if outfile == '-':
|
if outfile == '-':
|
||||||
sys.stdout.write(script)
|
sys.stdout.write(script)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue