Module: Dhall::Parser::FirstApplicationExpression

Defined in:
lib/dhall/parser.rb

Instance Method Summary collapse

Instance Method Details

#mergeObject



147
148
149
150
151
152
153
# File 'lib/dhall/parser.rb', line 147

def merge
	Merge.new(
		record: captures(:import_expression)[0].value,
		input:  captures(:import_expression)[1].value,
		type:   nil
	)
end

#valueObject



135
136
137
138
139
140
141
142
143
144
145
# File 'lib/dhall/parser.rb', line 135

def value
	if captures.key?(:merge)
		merge
	elsif captures.key?(:some)
		Optional.new(value: capture(:import_expression).value)
	elsif captures.key?(:tomap)
		ToMap.new(record: capture(:import_expression).value)
	else
		super
	end
end