Execute context optimizations

master
Salvo 'LtWorf' Tomaselli 2020-06-09 19:34:26 +07:00
parent 4337e6073e
commit 67d050e07d
No known key found for this signature in database
GPG Key ID: B3A7CF0C801886CF
1 changed files with 3 additions and 3 deletions

@ -82,10 +82,10 @@ def optimize_all(expression: Union[str, Node], rels: ContextDict, specific: bool
total = 0
if specific:
for i in optimizations.specific_optimizations:
res = i(n, rels) # Performs the optimization
if res != 0 and dbg:
n, c = recursive_scan(i, n, rels)
if c != 0 and dbg:
debug.append(str(n))
total += res
total += c
if general:
for i in optimizations.general_optimizations:
n, c = recursive_scan(i, n, None)