class TPPlus::Nodes::CallNode

Attributes

args[R]

Public Class Methods

new(program_name, args, options={}) click to toggle source
# File lib/tp_plus/nodes/call_node.rb, line 5
def initialize(program_name, args, options={})
  @program_name = program_name
  @args = args
  @async = options[:async]
end

Public Instance Methods

args_string(context) click to toggle source
# File lib/tp_plus/nodes/call_node.rb, line 19
def args_string(context)
  return "" unless @args.any?

  "(" + @args.map {|a| a.eval(context) }.join(",") + ")"
end
async?() click to toggle source
# File lib/tp_plus/nodes/call_node.rb, line 15
def async?
  @async
end
can_be_inlined?() click to toggle source
# File lib/tp_plus/nodes/call_node.rb, line 25
def can_be_inlined?
  true
end
eval(context,options={}) click to toggle source
# File lib/tp_plus/nodes/call_node.rb, line 29
def eval(context,options={})
  "#{async? ? "RUN" : "CALL"} #{@program_name.upcase}#{args_string(context)}"
end
requires_mixed_logic?(context) click to toggle source
# File lib/tp_plus/nodes/call_node.rb, line 11
def requires_mixed_logic?(context)
  false
end