Module: DhallishGrammar::NonEmptyListLiteral3
- Defined in:
- lib/DhallishGrammar.rb
Instance Method Summary collapse
Instance Method Details
#to_node ⇒ Object
1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 |
# File 'lib/DhallishGrammar.rb', line 1151 def to_node() list = [] list.append fst.to_node() tail.elements.each { |node| list.append node.exp.to_node() } if annot.respond_to? :type Dhallish::Ast::ListNode.new list, annot.type.to_node() else Dhallish::Ast::ListNode.new list, nil end end |