Module: Trxl::MatchingIdsFunction1

Defined in:
lib/trxl/trxl_grammar.rb

Instance Method Summary collapse

Instance Method Details

#eval(env = Environment.new) ⇒ Object



8208
8209
8210
8211
8212
8213
8214
# File 'lib/trxl/trxl_grammar.rb', line 8208

def eval(env = Environment.new)
  if(h = hash.eval(env)).is_a?(Hash)
    h.select { |k, v| v == match_exp.eval(env) }.map { |entry| entry[0]  }
  else
    []
  end
end