module DhallishGrammar::FunctionTypeExpression2
Public Instance Methods
to_node()
click to toggle source
# File lib/DhallishGrammar.rb, line 3336 def to_node() if tail.elements.size == 0 arg_type.to_node() else tree = nil tail.elements.reverse.each { |node| if tree.nil? tree = node.res_type.to_node() else tree = Dhallish::Ast::FunctionType.new node.res_type.to_node(), tree end } Dhallish::Ast::FunctionType.new arg_type.to_node(), tree end end