Module: DhallishGrammar::UnionLiteral3

Defined in:
lib/DhallishGrammar.rb

Instance Method Summary collapse

Instance Method Details

#to_nodeObject



2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
# File 'lib/DhallishGrammar.rb', line 2551

def to_node()
	typed_labels = {}
	start.elements.each { |node|
		typed_labels[node.lb.text_value] = node.type.to_node()
	}
	tail.elements.each { |node|
		typed_labels[node.lb.text_value] = node.type.to_node()
	}
	Dhallish::Ast::UnionLiteral.new(typed_labels, lb.text_value, expr.to_node())
end