Module: DhallishGrammar::RecordMergeExpression2

Defined in:
lib/DhallishGrammar.rb

Instance Method Summary collapse

Instance Method Details

#to_nodeObject



4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
# File 'lib/DhallishGrammar.rb', line 4317

def to_node()
	tail.elements.reduce(exp.to_node()) { |tree, node|
		if node.op.text_value == "//\\\\" or node.op.text_value == ""
			Dhallish::Ast::RecordTypeRecursiveMergeNode.new tree, node.exp.to_node()
		elsif node.op.text_value == "/\\" or node.op.text_value == ""
			Dhallish::Ast::RecordRecursiveMergeNode.new tree, node.exp.to_node()
		else
			Dhallish::Ast::RecordNonRecursiveMergeNode.new tree, node.exp.to_node()
		end
	}
end