Class: Macro::MetaClassNode

Inherits:
Object show all
Defined in:
lib/macro.rb

Instance Method Summary collapse

Instance Method Details

#macro_expand(macros, session) ⇒ Object



659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
# File 'lib/macro.rb', line 659

def macro_expand(macros,session)
   old_unsure=session[:@modpath_unsure]
   session[:@modpath_unsure]=true
   map!{|n| 
       case n
       when nil
       when Node; Macro.expand(n,macros,session)
       when Array; n.map!{|nn| Macro.expand(nn,macros,session) }
       else fail
       end
   }
   session[:@modpath_unsure]=old_unsure

   return nil,false #halt further recursion: already done
end