Class: Delorean::ErrorOp

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

Overview

hacky, for backwards compatibility

Instance Method Summary collapse

Instance Method Details

#check(context) ⇒ Object



257
258
259
# File 'lib/delorean/nodes.rb', line 257

def check(context, *)
  args.text_value == '' ? [] : args.check(context)
end

#rewrite(context) ⇒ Object



261
262
263
264
265
# File 'lib/delorean/nodes.rb', line 261

def rewrite(context, *)
  args.text_value != '' ?
    "_err(#{args.rewrite(context)})" :
    'binding.pry; 0'
end