module Dhall::Parser::NonEmptyRecordLiteral

Public Instance Methods

value(first_key) click to toggle source
# 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