Changeset d0f9b414f22cf5c006ff6a2b4bf13a0ff1f746cc


Ignore:
Timestamp:
29.07.2013 22:47:42 (8 years ago)
Author:
Stanislaw Klekot <dozzie@…>
Branches:
b66903eafbcb1d49112014abc82c8bf683413db0
Children:
2d978650caab7451136b31038f8897a98498e49e
Parents:
09576b09478dda1894b1ad9e430fd4da05707338
git-author:
Stanislaw Klekot <dozzie@…> (29.07.2013 22:47:42)
git-committer:
Stanislaw Klekot <dozzie@…> (29.07.2013 22:47:42)
Message:

Removed unnecessary now function from dashwiki.markup.ast.resolve_macros.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dashwiki/markup/ast/resolve_macros.py

    r347742 rd0f9b4  
    161161 
    162162    return result 
    163  
    164 #----------------------------------------------------------------------------- 
    165 # call_all_macros(flattened_tree) 
    166  
    167 def call_all_macros(flattened_tree): 
    168   def do_on_level(result_store, node, parents = datatypes.D()): 
    169     node.reset_state() 
    170     while node.has_uncalled(): 
    171       for macro in node.uncalled(): 
    172         if not node.is_callable(macro, parents): 
    173           continue 
    174         # FIXME: this may call macro with the same arguments multiple times 
    175         for k, r in node.call(macro, parents, result_store): 
    176           result_store << (k, r) 
    177     for pset in node.parent_sets(): 
    178       new_parents = parents + pset 
    179       for child in node.children(): 
    180         do_on_level(result_store, child, new_parents) 
    181  
    182   result = datatypes.ResultStore() 
    183   do_on_level(result, flattened_tree) 
    184   return result 
    185163 
    186164#----------------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.