Class: Delorean::NodeCall

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

Instance Method Summary collapse

Instance Method Details

#check(context) ⇒ Object



608
609
610
# File 'lib/delorean/nodes.rb', line 608

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

#rewrite(context, node_name) ⇒ Object



612
613
614
615
616
# File 'lib/delorean/nodes.rb', line 612

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