Module: Trxl::PrintFunction1

Defined in:
lib/trxl/trxl_grammar.rb

Instance Method Summary collapse

Instance Method Details

#eval(env = Environment.new) ⇒ Object



5496
5497
5498
5499
# File 'lib/trxl/trxl_grammar.rb', line 5496

def eval(env = Environment.new)
  result = expression.eval(env)
  print (result.is_a?(Array) || result.is_a?(Hash)) ? result.inspect : result.to_s
end