lib/finitio/syntax/type/struct_type.rb
module Finitio
module Syntax
module StructType
include Node
def compile(factory)
component_types = captures[:type].map{|x| x.compile(factory) }
factory.struct(component_types)
end
def to_ast
captures[:type].map(&:to_ast).unshift(:struct_type)
end
end # module StructType
end # module Syntax
end # module Finitio