[gen] Optimized PXs. [px] added tag 'var2', similar to 'var', but that is executed after tags 'for' and 'if'.
This commit is contained in:
parent
73c3cfb2c7
commit
1810373304
18 changed files with 834 additions and 956 deletions
|
@ -135,7 +135,10 @@ class IfAction(BufferAction):
|
|||
the result or not.'''
|
||||
def do(self, result, context, exprRes):
|
||||
if exprRes:
|
||||
self.evaluateBuffer(result, context)
|
||||
if self.subAction:
|
||||
self.subAction.execute(result, context)
|
||||
else:
|
||||
self.evaluateBuffer(result, context)
|
||||
else:
|
||||
if self.buffer.isMainElement(Cell.OD):
|
||||
# Don't leave the current row with a wrong number of cells
|
||||
|
|
|
@ -499,7 +499,7 @@ class MemoryBuffer(Buffer):
|
|||
'buffer', None)
|
||||
elif actionType == 'if':
|
||||
action= IfAction('if', self, statement, elem, False, 'buffer', None)
|
||||
elif actionType == 'var':
|
||||
elif actionType in ('var', 'var2'):
|
||||
variables = self._getVariables(statement)
|
||||
action = VariablesAction('var', self, elem, False, variables,
|
||||
'buffer', None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue