summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-06-02 15:32:03 -0700
committerCarl Worth <cworth@cworth.org>2010-06-02 15:32:03 -0700
commit22b3aced03c1a243ba03fbcba5aa51f97e4f0abb (patch)
tree48137395f408e9a9bc180c73bc247c4f0c211f0c /ast.h
parentc7c95fe51f0ff83d4d3e07a926f96336248f9509 (diff)
Eliminate some recursion from children of _expand_token_list
Previously, both _expand_node and _expand_function would always make mutually recursive calls into _expand_token_list. This was unnecessary since these functions can simply return unexpanded results, after which the outer iteration will next attempt expansion of the results. The only trick in doing this is to arrange so that the active list is popped at the appropriate time. To do this, we add a new token_node_t marker to the active stack. When pushing onto the active list, we set marker to last->next, and when the marker is seen by the token list iteration, we pop from the active stack.
Diffstat (limited to 'ast.h')
0 files changed, 0 insertions, 0 deletions