Module: Dhall::Parser::NonEmptyRecordLiteral
- Defined in:
- lib/dhall/parser.rb
Instance Method Summary collapse
Instance Method Details
#value(first_key) ⇒ Object
447 448 449 450 451 452 453 454 455 |
# File 'lib/dhall/parser.rb', line 447 def value(first_key) Record.new( record: captures(:record_literal_entry).map(&:value).reduce( first_key => capture(:expression).value ) do |final, rec| final.merge(rec) { raise TypeError, "duplicate field" } end ) end |