-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
Description
- parglare version: 0.12.0
- Python version: 3.7.8
- Operating System: fedora 31
Description
for some uses, a non-reversing actions execution can be of good use. i propose to extend the definition:
def call_actions(node, context=None, reverse=True):
...
if (reverse):
# Recursive right to left, bottom up. Simulate LR reductions.
for n in reversed(node):
subresults.append(inner_call_actions(n))
subresults.reverse()
else:
for n in (node):
subresults.append(inner_call_actions(n))
Usecase
text to be parsed (here a tikz example)
\draw [line width=2pt,color=wwffqq,domain=-4:12.44] plot(\x,{(-1.4356438- -0.96*\x)/0.26});
in this case, definig the attributes (like "domain") in the same line and using them in the "plot" is only possible in a non-reversed execution. also, coincidentially, then the "draw" directive will be called last allowing for actually executing the completely assembled plot-code.