Module: Trxl::BinaryExpressionOp0

Defined in:
lib/trxl/trxl_grammar.rb

Instance Method Summary collapse

Instance Method Details

#apply(a, b) ⇒ Object



3054
3055
3056
3057
3058
3059
3060
# File 'lib/trxl/trxl_grammar.rb', line 3054

def apply(a, b)
  if a.is_a?(Array)
    super
  else
    raise Trxl::InvalidOperationException, "Left operand is not an Array"
  end
end

#lhs_nil_allowed?Boolean

override default behavior since it’s not possible to push into nil

Returns:

  • (Boolean)


3063
3064
3065
# File 'lib/trxl/trxl_grammar.rb', line 3063

def lhs_nil_allowed?
  false
end