Module: DhallishGrammar::RecordTypeLiteral4
- Defined in:
- lib/DhallishGrammar.rb
Instance Method Summary collapse
Instance Method Details
#to_node ⇒ Object
1446 1447 1448 1449 1450 1451 1452 1453 1454 |
# File 'lib/DhallishGrammar.rb', line 1446 def to_node() data = { fstkey.text_value => fstexp.to_node() } tail.elements.each { |node| key = node.key.text_value assert("no key should apeare multiple times in a record: `#{key}`") { !data.key?(key) } data[key] = node.exp.to_node() } Dhallish::Ast::RecordTypeNode.new data end |