Class: Delorean::NodeCall

Inherits:
SNode
  • Object
show all
Defined in:
lib/delorean/nodes.rb

Instance Method Summary collapse

Instance Method Details

#check(context) ⇒ Object



597
598
599
# File 'lib/delorean/nodes.rb', line 597

def check(context, *)
  al.text_value.empty? ? [] : al.check(context)
end

#rewrite(context, node_name) ⇒ Object



601
602
603
604
605
# File 'lib/delorean/nodes.rb', line 601

def rewrite(context, node_name)
  var = "_h#{context.hcount}"
  res = al.text_value.empty? ? '' : al.rewrite(context, var)
  "(#{var}={}; #{res}; _node_call(#{node_name}, _e, #{var}))"
end