# encoding: utf-8 # frozen_string_literal: true lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "ruby-prof" require "pry" require "pry-byebug" require "pry-rescue" require "carbon" require "carbon/compiler" Carbon.verbose += 1 Pry.rescue do project = Carbon::Compiler::Project.new(["program.ca"], ".") index = project.call main = Carbon::Type("Program.main()") build = Carbon::Concrete::Build.new(index.build(main), index) build.call puts build.module end