Sha256: 0514e806a9a710471f3efd1f808ca33324fad31b24181ea261e9818ade51065d
Contents?: true
Size: 602 Bytes
Versions: 14
Compression:
Stored size: 602 Bytes
Contents
module Finitio module Syntax module System include Node capture :imports, :definitions, :main_type def compile(system) imports.compile(system) if imports definitions.compile(system) main_type.compile(system) if main_type system end def to_ast ast = [ :system ] imports_ast = imports.to_ast ast << imports_ast unless imports_ast.size == 1 ast += definitions.to_ast ast << main_type.to_ast if main_type ast end end # module System end # module Syntax end # module Finitio
Version data entries
14 entries across 14 versions & 1 rubygems