myco 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/myco/bootstrap/component.rb +5 -0
- data/lib/myco/bootstrap.my.rb +18 -0
- data/lib/myco/command/inoculate.my +8 -8
- data/lib/myco/command/inoculate.my.rb +202 -0
- data/lib/myco/command.my.rb +77 -0
- data/lib/myco/core/BasicDecorators.my.rb +129 -0
- data/lib/myco/core/BasicObject.my.rb +50 -0
- data/lib/myco/core/Category.my.rb +18 -0
- data/lib/myco/core/Decorator.my.rb +52 -0
- data/lib/myco/core/FileToplevel.my.rb +42 -0
- data/lib/myco/core/Object.my.rb +55 -0
- data/lib/myco/core/Switch.my.rb +74 -0
- data/lib/myco/tools/BasicCommand.my.rb +84 -0
- data/lib/myco/tools/mycompile.my.rb +136 -0
- data/lib/myco/version.rb +1 -1
- metadata +58 -61
- data/lib/myco/core/Myco.my +0 -4
- data/lib/myco/tools/Generator.my +0 -18
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: c7120707eb3cf4f2630bbda7bddbf88a64956cb9
         | 
| 4 | 
            +
              data.tar.gz: 6fe624e6aab7c551c6b9d313acc7dcdf9c37eeff
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 90a9b6c2b8c7d9523cb71d9740e314c743565d9a9128c8c7bd273335be190fc87f76e45b82fec69f0a530bb24342ba60d11a1ca8d14b3bc4784945454408aa83
         | 
| 7 | 
            +
              data.tar.gz: 771063aed886cd75ea2a88cf1d5222f04a5a2fa49bbd55e2497bb9e1453a3df2f4de034ca055adc8bcc7dec88d2a4a69b6ef7ff1e376248d705f8dda22763a83
         | 
    
        data/README.md
    CHANGED
    
    | @@ -1,12 +1,12 @@ | |
| 1 | 
            +
            [](https://travis-ci.org/jemc/myco)
         | 
| 1 2 |  | 
| 2 3 | 
             
            ```myco
         | 
| 3 4 | 
             
            Myco < Ruby, QML, Ioke {
         | 
| 4 5 | 
             
              primary author: "Joe Eli McIlvain"
         | 
| 5 6 |  | 
| 6 | 
            -
              latest gem version: 0.1.0
         | 
| 7 7 | 
             
              development status: [:alpha, :experimental]
         | 
| 8 8 |  | 
| 9 | 
            -
              dependency "Rubinius VM" | 
| 9 | 
            +
              dependency "Rubinius VM"
         | 
| 10 10 |  | 
| 11 11 | 
             
              development dependency 'bundler':  1.6
         | 
| 12 12 | 
             
              development dependency 'rake':    10.3
         | 
| @@ -161,6 +161,11 @@ module Myco | |
| 161 161 | 
             
                  kwargs.each { |key,val| instance.send :"#{key}=", val }
         | 
| 162 162 | 
             
                  instance
         | 
| 163 163 | 
             
                end
         | 
| 164 | 
            +
              end
         | 
| 165 | 
            +
              
         | 
| 166 | 
            +
              # TODO: use a better approach than this monkey-patch
         | 
| 167 | 
            +
              class ::Module
         | 
| 168 | 
            +
                include ::Myco::MemeBindable
         | 
| 164 169 |  | 
| 165 170 | 
             
                # Like module_eval, but it also shifts the ConstantScope of the block
         | 
| 166 171 | 
             
                def component_eval &block
         | 
| @@ -0,0 +1,18 @@ | |
| 1 | 
            +
            ::Myco::Component.new([
         | 
| 2 | 
            +
              ::Myco::FileToplevel
         | 
| 3 | 
            +
            ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 4 | 
            +
            .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 5 | 
            +
              ::Myco::RubyEval = ::Myco::Component.new([
         | 
| 6 | 
            +
                ::Myco.find_constant(:EmptyObject)
         | 
| 7 | 
            +
              ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 8 | 
            +
              .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 9 | 
            +
                declare_meme(:from_string, [], nil, ::Myco.cscope.dup) { |string| (
         | 
| 10 | 
            +
                  ::Kernel.instance_method(:eval).bind(self).call(string)
         | 
| 11 | 
            +
                )}
         | 
| 12 | 
            +
              )}}
         | 
| 13 | 
            +
              .tap { |__c__| __c__.__name__ = :RubyEval }
         | 
| 14 | 
            +
              ::Myco::Component.new([
         | 
| 15 | 
            +
                ::Myco.find_constant(:RubyEval)
         | 
| 16 | 
            +
              ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 17 | 
            +
              .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}.instance.from_string("  Myco.eval_file(\"core/Category.my\",        [Myco::CoreLoadPath])\n  Myco.eval_file(\"core/BasicDecorators.my\", [Myco::CoreLoadPath])\n  Myco.eval_file(\"core/BasicObject.my\",     [Myco::CoreLoadPath])\n  Myco.eval_file(\"core/Decorator.my\",       [Myco::CoreLoadPath])\n  Myco.eval_file(\"core/Object.my\",          [Myco::CoreLoadPath])\n  Myco.eval_file(\"core/FileToplevel.my\",    [Myco::CoreLoadPath])\n  \n  # Below are not necessary for bootstrapping; TODO: move out of RubyEval\n  Myco.eval_file(\"core/Switch.my\",          [Myco::CoreLoadPath])\n")
         | 
| 18 | 
            +
            )}}.instance
         | 
| @@ -14,10 +14,12 @@ BasicCommand { | |
| 14 14 | 
             
                ?? destinations.each |dest| {
         | 
| 15 15 | 
             
                  config.dest = dest
         | 
| 16 16 |  | 
| 17 | 
            -
                  run_operation(:copy, files(config.source, ' | 
| 18 | 
            -
                  run_operation(:copy, files(config.source, ' | 
| 19 | 
            -
                  run_operation(:copy, files(config.source, ' | 
| 20 | 
            -
                  run_operation(: | 
| 17 | 
            +
                  run_operation(:copy, files(config.source, '*.md'))
         | 
| 18 | 
            +
                  run_operation(:copy, files(config.source, 'LICENSE'))
         | 
| 19 | 
            +
                  run_operation(:copy, files(config.source, 'bin/*'))
         | 
| 20 | 
            +
                  run_operation(:copy, files(config.source, 'lib/**/*.rb'))
         | 
| 21 | 
            +
                  run_operation(:copy, files(config.source, 'lib/**/*.my'))
         | 
| 22 | 
            +
                  run_operation(:myrb, files(config.dest,   'lib/**/*.my'))
         | 
| 21 23 |  | 
| 22 24 | 
             
                  if(config.verbose) {
         | 
| 23 25 | 
             
                    prog = Rubinius::Globals[:"$PROGRAM_NAME"]
         | 
| @@ -43,10 +45,8 @@ BasicCommand { | |
| 43 45 | 
             
              operation_is_unnecessary: |source, dest|
         | 
| 44 46 | 
             
                File.file?(dest) && File.mtime(dest) >= File.mtime(source)
         | 
| 45 47 |  | 
| 46 | 
            -
              files: |prefix,  | 
| 47 | 
            -
                prefix  | 
| 48 | 
            -
                Dir.glob(File.join(subdir, "**", "*"ext""))
         | 
| 49 | 
            -
              }
         | 
| 48 | 
            +
              files: |prefix, glob|
         | 
| 49 | 
            +
                Dir.glob(prefix &? File.join(prefix, glob) ?? glob)
         | 
| 50 50 |  | 
| 51 51 | 
             
              [operations]
         | 
| 52 52 |  | 
| @@ -0,0 +1,202 @@ | |
| 1 | 
            +
            ::Myco::Component.new([
         | 
| 2 | 
            +
              ::Myco::FileToplevel
         | 
| 3 | 
            +
            ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 4 | 
            +
            .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 5 | 
            +
              declare_meme(:"../tools/BasicCommand.my", [
         | 
| 6 | 
            +
                [:import, []]
         | 
| 7 | 
            +
              ], nil, ::Myco.cscope.dup) { |*| nil}
         | 
| 8 | 
            +
              ::Myco::Component.new([
         | 
| 9 | 
            +
                ::Myco.find_constant(:BasicCommand)
         | 
| 10 | 
            +
              ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 11 | 
            +
              .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 12 | 
            +
                declare_meme(:banner, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 13 | 
            +
                  "Usage: myco inoculate [options]"
         | 
| 14 | 
            +
                )}
         | 
| 15 | 
            +
                declare_meme(:shell, [], nil, ::Myco.cscope.dup) { |*a, &b| (
         | 
| 16 | 
            +
                  ::Myco.find_constant(:Kernel).instance_method(:system).bind(self).call(
         | 
| 17 | 
            +
                    *a,
         | 
| 18 | 
            +
                    &b
         | 
| 19 | 
            +
                  )
         | 
| 20 | 
            +
                )}
         | 
| 21 | 
            +
                declare_meme(:run, [], nil, ::Myco.cscope.dup) { |*argv| (
         | 
| 22 | 
            +
                  destinations = self.options_parse(*argv)
         | 
| 23 | 
            +
                  ::Myco.branch_op(:"??", ::Myco.branch_op(:"|?", destinations.size.__send__(
         | 
| 24 | 
            +
                    :==,
         | 
| 25 | 
            +
                    1
         | 
| 26 | 
            +
                  )) {self.show_help}) {destinations.each { |dest| (
         | 
| 27 | 
            +
                    self.config.__send__(
         | 
| 28 | 
            +
                      :dest=,
         | 
| 29 | 
            +
                      dest
         | 
| 30 | 
            +
                    )
         | 
| 31 | 
            +
                    self.run_operation(
         | 
| 32 | 
            +
                      :copy,
         | 
| 33 | 
            +
                      self.files(
         | 
| 34 | 
            +
                        self.config.source,
         | 
| 35 | 
            +
                        "*.md"
         | 
| 36 | 
            +
                      )
         | 
| 37 | 
            +
                    )
         | 
| 38 | 
            +
                    self.run_operation(
         | 
| 39 | 
            +
                      :copy,
         | 
| 40 | 
            +
                      self.files(
         | 
| 41 | 
            +
                        self.config.source,
         | 
| 42 | 
            +
                        "LICENSE"
         | 
| 43 | 
            +
                      )
         | 
| 44 | 
            +
                    )
         | 
| 45 | 
            +
                    self.run_operation(
         | 
| 46 | 
            +
                      :copy,
         | 
| 47 | 
            +
                      self.files(
         | 
| 48 | 
            +
                        self.config.source,
         | 
| 49 | 
            +
                        "bin/*"
         | 
| 50 | 
            +
                      )
         | 
| 51 | 
            +
                    )
         | 
| 52 | 
            +
                    self.run_operation(
         | 
| 53 | 
            +
                      :copy,
         | 
| 54 | 
            +
                      self.files(
         | 
| 55 | 
            +
                        self.config.source,
         | 
| 56 | 
            +
                        "lib/**/*.rb"
         | 
| 57 | 
            +
                      )
         | 
| 58 | 
            +
                    )
         | 
| 59 | 
            +
                    self.run_operation(
         | 
| 60 | 
            +
                      :copy,
         | 
| 61 | 
            +
                      self.files(
         | 
| 62 | 
            +
                        self.config.source,
         | 
| 63 | 
            +
                        "lib/**/*.my"
         | 
| 64 | 
            +
                      )
         | 
| 65 | 
            +
                    )
         | 
| 66 | 
            +
                    self.run_operation(
         | 
| 67 | 
            +
                      :myrb,
         | 
| 68 | 
            +
                      self.files(
         | 
| 69 | 
            +
                        self.config.dest,
         | 
| 70 | 
            +
                        "lib/**/*.my"
         | 
| 71 | 
            +
                      )
         | 
| 72 | 
            +
                    )
         | 
| 73 | 
            +
                    self.__send__(
         | 
| 74 | 
            +
                      :if,
         | 
| 75 | 
            +
                      self.config.verbose
         | 
| 76 | 
            +
                    ) { || (
         | 
| 77 | 
            +
                      prog = ::Myco.find_constant(:Rubinius)::Globals.__send__(
         | 
| 78 | 
            +
                        :[],
         | 
| 79 | 
            +
                        :$PROGRAM_NAME
         | 
| 80 | 
            +
                      )
         | 
| 81 | 
            +
                      self.puts("DONE #{prog} #{::Myco.find_constant(:ARGV).join(" ")}")
         | 
| 82 | 
            +
                    )}
         | 
| 83 | 
            +
                  )}}
         | 
| 84 | 
            +
                )}
         | 
| 85 | 
            +
                declare_meme(:run_operation, [], nil, ::Myco.cscope.dup) { |opcode, source_list| (
         | 
| 86 | 
            +
                  source_list.each { |source| (
         | 
| 87 | 
            +
                    dest = self.transforms.send(
         | 
| 88 | 
            +
                      opcode,
         | 
| 89 | 
            +
                      source
         | 
| 90 | 
            +
                    )
         | 
| 91 | 
            +
                    self.__send__(
         | 
| 92 | 
            +
                      :unless,
         | 
| 93 | 
            +
                      self.operation_is_unnecessary(
         | 
| 94 | 
            +
                        source,
         | 
| 95 | 
            +
                        dest
         | 
| 96 | 
            +
                      )
         | 
| 97 | 
            +
                    ) { || (
         | 
| 98 | 
            +
                      self.__send__(
         | 
| 99 | 
            +
                        :if,
         | 
| 100 | 
            +
                        self.config.verbose
         | 
| 101 | 
            +
                      ) { || (
         | 
| 102 | 
            +
                        self.puts("#{opcode.upcase} #{source}")
         | 
| 103 | 
            +
                        self.puts("  => #{dest}")
         | 
| 104 | 
            +
                      )}
         | 
| 105 | 
            +
                      self.operations.send(
         | 
| 106 | 
            +
                        opcode,
         | 
| 107 | 
            +
                        source,
         | 
| 108 | 
            +
                        dest
         | 
| 109 | 
            +
                      )
         | 
| 110 | 
            +
                    )}
         | 
| 111 | 
            +
                  )}
         | 
| 112 | 
            +
                )}
         | 
| 113 | 
            +
                declare_meme(:operation_is_unnecessary, [], nil, ::Myco.cscope.dup) { |source, dest| (
         | 
| 114 | 
            +
                  ::Myco.branch_op(:"&&", ::Myco.find_constant(:File).__send__(
         | 
| 115 | 
            +
                    :file?,
         | 
| 116 | 
            +
                    dest
         | 
| 117 | 
            +
                  )) {::Myco.find_constant(:File).mtime(dest).__send__(
         | 
| 118 | 
            +
                    :>=,
         | 
| 119 | 
            +
                    ::Myco.find_constant(:File).mtime(source)
         | 
| 120 | 
            +
                  )}
         | 
| 121 | 
            +
                )}
         | 
| 122 | 
            +
                declare_meme(:files, [], nil, ::Myco.cscope.dup) { |prefix, glob| (
         | 
| 123 | 
            +
                  ::Myco.find_constant(:Dir).glob(::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", prefix) {::Myco.find_constant(:File).join(
         | 
| 124 | 
            +
                    prefix,
         | 
| 125 | 
            +
                    glob
         | 
| 126 | 
            +
                  )}) {glob})
         | 
| 127 | 
            +
                )}
         | 
| 128 | 
            +
                __category__(:operations).component_eval {(
         | 
| 129 | 
            +
                  declare_meme(:copy, [], nil, ::Myco.cscope.dup) { |source, dest| (
         | 
| 130 | 
            +
                    self.shell("mkdir -p #{::Myco.find_constant(:File).dirname(dest)} && cp #{source} #{dest}")
         | 
| 131 | 
            +
                  )}
         | 
| 132 | 
            +
                  declare_meme(:myrb, [], nil, ::Myco.cscope.dup) { |source, dest| (
         | 
| 133 | 
            +
                    ::Myco.find_constant(:Myco)::CodeLoader::MycoLoader.new(source).__send__(:emit_rb!)
         | 
| 134 | 
            +
                  )}
         | 
| 135 | 
            +
                )}
         | 
| 136 | 
            +
                __category__(:transforms).component_eval {(
         | 
| 137 | 
            +
                  declare_meme(:copy, [], nil, ::Myco.cscope.dup) { |filename| (
         | 
| 138 | 
            +
                    ::Myco.find_constant(:File).join(
         | 
| 139 | 
            +
                      self.config.dest,
         | 
| 140 | 
            +
                      filename
         | 
| 141 | 
            +
                    )
         | 
| 142 | 
            +
                  )}
         | 
| 143 | 
            +
                  declare_meme(:myrb, [], nil, ::Myco.cscope.dup) { |filename| (
         | 
| 144 | 
            +
                    "#{filename}.rb"
         | 
| 145 | 
            +
                  )}
         | 
| 146 | 
            +
                )}
         | 
| 147 | 
            +
                __category__(:config).component_eval {(
         | 
| 148 | 
            +
                  declare_meme(:source, [
         | 
| 149 | 
            +
                    [:var, []]
         | 
| 150 | 
            +
                  ], nil, ::Myco.cscope.dup) { |*| nil}
         | 
| 151 | 
            +
                  declare_meme(:dest, [
         | 
| 152 | 
            +
                    [:var, []]
         | 
| 153 | 
            +
                  ], nil, ::Myco.cscope.dup) { |*| nil}
         | 
| 154 | 
            +
                  declare_meme(:verbose, [
         | 
| 155 | 
            +
                    [:var, []]
         | 
| 156 | 
            +
                  ], nil, ::Myco.cscope.dup) { |*| nil}
         | 
| 157 | 
            +
                )}
         | 
| 158 | 
            +
                __category__(:options).component_eval {(
         | 
| 159 | 
            +
                  declare_meme(:"-d", [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 160 | 
            +
                    ::Myco::Component.new([
         | 
| 161 | 
            +
                      ::Myco.find_constant(:Option)
         | 
| 162 | 
            +
                    ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 163 | 
            +
                    .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 164 | 
            +
                      declare_meme(:description, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 165 | 
            +
                        "The destination directory to clone material into."
         | 
| 166 | 
            +
                      )}
         | 
| 167 | 
            +
                      declare_meme(:long_form, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 168 | 
            +
                        "--dest"
         | 
| 169 | 
            +
                      )}
         | 
| 170 | 
            +
                      declare_meme(:argument, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 171 | 
            +
                        "STRING"
         | 
| 172 | 
            +
                      )}
         | 
| 173 | 
            +
                      declare_meme(:do, [], nil, ::Myco.cscope.dup) { |arg| (
         | 
| 174 | 
            +
                        self.parent.config.__send__(
         | 
| 175 | 
            +
                          :dest=,
         | 
| 176 | 
            +
                          arg
         | 
| 177 | 
            +
                        )
         | 
| 178 | 
            +
                      )}
         | 
| 179 | 
            +
                    )}}.instance
         | 
| 180 | 
            +
                  )}
         | 
| 181 | 
            +
                  declare_meme(:"-v", [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 182 | 
            +
                    ::Myco::Component.new([
         | 
| 183 | 
            +
                      ::Myco.find_constant(:Option)
         | 
| 184 | 
            +
                    ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 185 | 
            +
                    .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 186 | 
            +
                      declare_meme(:description, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 187 | 
            +
                        "Show details about material cloning operations."
         | 
| 188 | 
            +
                      )}
         | 
| 189 | 
            +
                      declare_meme(:long_form, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 190 | 
            +
                        "--verbose"
         | 
| 191 | 
            +
                      )}
         | 
| 192 | 
            +
                      declare_meme(:do, [], nil, ::Myco.cscope.dup) { |arg| (
         | 
| 193 | 
            +
                        self.parent.config.__send__(
         | 
| 194 | 
            +
                          :verbose=,
         | 
| 195 | 
            +
                          true
         | 
| 196 | 
            +
                        )
         | 
| 197 | 
            +
                      )}
         | 
| 198 | 
            +
                    )}}.instance
         | 
| 199 | 
            +
                  )}
         | 
| 200 | 
            +
                )}
         | 
| 201 | 
            +
              )}}.instance
         | 
| 202 | 
            +
            )}}.instance
         | 
| @@ -0,0 +1,77 @@ | |
| 1 | 
            +
            ::Myco::Component.new([
         | 
| 2 | 
            +
              ::Myco::FileToplevel
         | 
| 3 | 
            +
            ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 4 | 
            +
            .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 5 | 
            +
              declare_meme(:"tools/BasicCommand.my", [
         | 
| 6 | 
            +
                [:import, []]
         | 
| 7 | 
            +
              ], nil, ::Myco.cscope.dup) { |*| nil}
         | 
| 8 | 
            +
              ::Myco::Component.new([
         | 
| 9 | 
            +
                ::Myco.find_constant(:BasicCommand)
         | 
| 10 | 
            +
              ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 11 | 
            +
              .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 12 | 
            +
                declare_meme(:banner, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 13 | 
            +
                  "Usage: myco [subcommand] [options] [files]"
         | 
| 14 | 
            +
                )}
         | 
| 15 | 
            +
                declare_meme(:creation, [
         | 
| 16 | 
            +
                  [:on, []]
         | 
| 17 | 
            +
                ], nil, ::Myco.cscope.dup) { |*| (
         | 
| 18 | 
            +
                  self.run(*::Myco.find_constant(:ARGV))
         | 
| 19 | 
            +
                )}
         | 
| 20 | 
            +
                declare_meme(:run, [], nil, ::Myco.cscope.dup) { |*argv| (
         | 
| 21 | 
            +
                  files = self.options_parse(*argv)
         | 
| 22 | 
            +
                  ::Myco.branch_op(:"&&", files) {files.uniq.each { |file| (
         | 
| 23 | 
            +
                    ::Myco.find_constant(:Myco).eval_file(
         | 
| 24 | 
            +
                      file,
         | 
| 25 | 
            +
                      [
         | 
| 26 | 
            +
                        ::Dir.pwd
         | 
| 27 | 
            +
                      ]
         | 
| 28 | 
            +
                    )
         | 
| 29 | 
            +
                  )}}
         | 
| 30 | 
            +
                )}
         | 
| 31 | 
            +
                __category__(:options).component_eval {(
         | 
| 32 | 
            +
                  declare_meme(:"-E", [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 33 | 
            +
                    ::Myco::Component.new([
         | 
| 34 | 
            +
                      ::Myco.find_constant(:Option)
         | 
| 35 | 
            +
                    ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 36 | 
            +
                    .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 37 | 
            +
                      declare_meme(:description, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 38 | 
            +
                        "Evaluate a string of declarative Myco"
         | 
| 39 | 
            +
                      )}
         | 
| 40 | 
            +
                      declare_meme(:long_form, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 41 | 
            +
                        "--eval"
         | 
| 42 | 
            +
                      )}
         | 
| 43 | 
            +
                      declare_meme(:argument, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 44 | 
            +
                        "STRING"
         | 
| 45 | 
            +
                      )}
         | 
| 46 | 
            +
                      declare_meme(:do, [], nil, ::Myco.cscope.dup) { |arg| (
         | 
| 47 | 
            +
                        ::Myco.find_constant(:Myco).eval(arg)
         | 
| 48 | 
            +
                      )}
         | 
| 49 | 
            +
                    )}}.instance
         | 
| 50 | 
            +
                  )}
         | 
| 51 | 
            +
                  declare_meme(:"-e", [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 52 | 
            +
                    ::Myco::Component.new([
         | 
| 53 | 
            +
                      ::Myco.find_constant(:Option)
         | 
| 54 | 
            +
                    ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 55 | 
            +
                    .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 56 | 
            +
                      declare_meme(:description, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 57 | 
            +
                        "Evaluate a string of procedural Myco inside an Object"
         | 
| 58 | 
            +
                      )}
         | 
| 59 | 
            +
                      declare_meme(:long_form, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 60 | 
            +
                        "--eval-meme"
         | 
| 61 | 
            +
                      )}
         | 
| 62 | 
            +
                      declare_meme(:argument, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 63 | 
            +
                        "STRING"
         | 
| 64 | 
            +
                      )}
         | 
| 65 | 
            +
                      declare_meme(:do, [], nil, ::Myco.cscope.dup) { |arg| (
         | 
| 66 | 
            +
                        ::Myco.find_constant(:Myco).eval("Object { on creation: { #{arg} } }")
         | 
| 67 | 
            +
                      )}
         | 
| 68 | 
            +
                    )}}.instance
         | 
| 69 | 
            +
                  )}
         | 
| 70 | 
            +
                )}
         | 
| 71 | 
            +
                __category__(:commands).component_eval {(
         | 
| 72 | 
            +
                  declare_meme(:inoculate, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 73 | 
            +
                    ::Myco.find_constant(:Myco).eval_file("command/inoculate.my")
         | 
| 74 | 
            +
                  )}
         | 
| 75 | 
            +
                )}
         | 
| 76 | 
            +
              )}}.instance
         | 
| 77 | 
            +
            )}}.instance
         | 
| @@ -0,0 +1,129 @@ | |
| 1 | 
            +
            ::Myco::Component.new([
         | 
| 2 | 
            +
              ::Myco::FileToplevel
         | 
| 3 | 
            +
            ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 4 | 
            +
            .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 5 | 
            +
              ::Myco::BasicDecorators = ::Myco::Component.new([
         | 
| 6 | 
            +
                ::Myco::EmptyObject
         | 
| 7 | 
            +
              ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 8 | 
            +
              .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 9 | 
            +
                __category__(:decorators).component_eval {(
         | 
| 10 | 
            +
                  declare_meme(:storage, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 11 | 
            +
                    ::Myco::Component.new([
         | 
| 12 | 
            +
                      ::Myco.find_constant(:Decorator)
         | 
| 13 | 
            +
                    ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 14 | 
            +
                    .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 15 | 
            +
                      declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme| (
         | 
| 16 | 
            +
                        meme.target.declare_meme(:"#{meme.name}=") { |new_value, *args| (
         | 
| 17 | 
            +
                          meme.set_result_for(
         | 
| 18 | 
            +
                            self,
         | 
| 19 | 
            +
                            new_value,
         | 
| 20 | 
            +
                            *args
         | 
| 21 | 
            +
                          )
         | 
| 22 | 
            +
                        )}
         | 
| 23 | 
            +
                      )}
         | 
| 24 | 
            +
                      __category__(:transforms).component_eval {(
         | 
| 25 | 
            +
                        declare_meme(:cache, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 26 | 
            +
                          true
         | 
| 27 | 
            +
                        )}
         | 
| 28 | 
            +
                      )}
         | 
| 29 | 
            +
                    )}}.instance
         | 
| 30 | 
            +
                  )}
         | 
| 31 | 
            +
                  declare_meme(:var, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 32 | 
            +
                    ::Myco::Component.new([
         | 
| 33 | 
            +
                      ::Myco.find_constant(:Decorator)
         | 
| 34 | 
            +
                    ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 35 | 
            +
                    .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 36 | 
            +
                      __category__(:transforms).component_eval {(
         | 
| 37 | 
            +
                        declare_meme(:var, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 38 | 
            +
                          true
         | 
| 39 | 
            +
                        )}
         | 
| 40 | 
            +
                      )}
         | 
| 41 | 
            +
                    )}}.instance
         | 
| 42 | 
            +
                  )}
         | 
| 43 | 
            +
                  declare_meme(:memoize, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 44 | 
            +
                    ::Myco::Component.new([
         | 
| 45 | 
            +
                      ::Myco.find_constant(:Decorator)
         | 
| 46 | 
            +
                    ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 47 | 
            +
                    .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 48 | 
            +
                      __category__(:transforms).component_eval {(
         | 
| 49 | 
            +
                        declare_meme(:cache, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 50 | 
            +
                          true
         | 
| 51 | 
            +
                        )}
         | 
| 52 | 
            +
                      )}
         | 
| 53 | 
            +
                    )}}.instance
         | 
| 54 | 
            +
                  )}
         | 
| 55 | 
            +
                  declare_meme(:sclass, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 56 | 
            +
                    ::Myco::Component.new([
         | 
| 57 | 
            +
                      ::Myco.find_constant(:Decorator)
         | 
| 58 | 
            +
                    ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 59 | 
            +
                    .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 60 | 
            +
                      __category__(:transforms).component_eval {(
         | 
| 61 | 
            +
                        declare_meme(:target, [], nil, ::Myco.cscope.dup) { |meme| (
         | 
| 62 | 
            +
                          meme.target.singleton_class
         | 
| 63 | 
            +
                        )}
         | 
| 64 | 
            +
                      )}
         | 
| 65 | 
            +
                    )}}.instance
         | 
| 66 | 
            +
                  )}
         | 
| 67 | 
            +
                  declare_meme(:before, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 68 | 
            +
                    ::Myco::Component.new([
         | 
| 69 | 
            +
                      ::Myco.find_constant(:Decorator)
         | 
| 70 | 
            +
                    ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 71 | 
            +
                    .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 72 | 
            +
                      declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme| (
         | 
| 73 | 
            +
                        orig_meme = meme.target.memes.__send__(
         | 
| 74 | 
            +
                          :[],
         | 
| 75 | 
            +
                          meme.name
         | 
| 76 | 
            +
                        )
         | 
| 77 | 
            +
                        wrap_meme = meme.dup
         | 
| 78 | 
            +
                        meme.__send__(
         | 
| 79 | 
            +
                          :body=,
         | 
| 80 | 
            +
                          ::Myco.find_constant(:Proc).new { |*a, &b| (
         | 
| 81 | 
            +
                            wrap_meme.result_for(
         | 
| 82 | 
            +
                              self,
         | 
| 83 | 
            +
                              *a,
         | 
| 84 | 
            +
                              &b
         | 
| 85 | 
            +
                            )
         | 
| 86 | 
            +
                            orig_meme.result_for(
         | 
| 87 | 
            +
                              self,
         | 
| 88 | 
            +
                              *a,
         | 
| 89 | 
            +
                              &b
         | 
| 90 | 
            +
                            )
         | 
| 91 | 
            +
                          )}
         | 
| 92 | 
            +
                        )
         | 
| 93 | 
            +
                      )}
         | 
| 94 | 
            +
                    )}}.instance
         | 
| 95 | 
            +
                  )}
         | 
| 96 | 
            +
                  declare_meme(:after, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 97 | 
            +
                    ::Myco::Component.new([
         | 
| 98 | 
            +
                      ::Myco.find_constant(:Decorator)
         | 
| 99 | 
            +
                    ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 100 | 
            +
                    .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 101 | 
            +
                      declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme| (
         | 
| 102 | 
            +
                        orig_meme = meme.target.memes.__send__(
         | 
| 103 | 
            +
                          :[],
         | 
| 104 | 
            +
                          meme.name
         | 
| 105 | 
            +
                        )
         | 
| 106 | 
            +
                        wrap_meme = meme.dup
         | 
| 107 | 
            +
                        meme.__send__(
         | 
| 108 | 
            +
                          :body=,
         | 
| 109 | 
            +
                          ::Myco.find_constant(:Proc).new { |*a, &b| (
         | 
| 110 | 
            +
                            result = orig_meme.result_for(
         | 
| 111 | 
            +
                              self,
         | 
| 112 | 
            +
                              *a,
         | 
| 113 | 
            +
                              &b
         | 
| 114 | 
            +
                            )
         | 
| 115 | 
            +
                            wrap_meme.result_for(
         | 
| 116 | 
            +
                              self,
         | 
| 117 | 
            +
                              *a,
         | 
| 118 | 
            +
                              &b
         | 
| 119 | 
            +
                            )
         | 
| 120 | 
            +
                            result
         | 
| 121 | 
            +
                          )}
         | 
| 122 | 
            +
                        )
         | 
| 123 | 
            +
                      )}
         | 
| 124 | 
            +
                    )}}.instance
         | 
| 125 | 
            +
                  )}
         | 
| 126 | 
            +
                )}
         | 
| 127 | 
            +
              )}}
         | 
| 128 | 
            +
              .tap { |__c__| __c__.__name__ = :BasicDecorators }
         | 
| 129 | 
            +
            )}}.instance
         | 
| @@ -0,0 +1,50 @@ | |
| 1 | 
            +
            ::Myco::Component.new([
         | 
| 2 | 
            +
              ::Myco::FileToplevel
         | 
| 3 | 
            +
            ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 4 | 
            +
            .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 5 | 
            +
              ::Myco::BasicObject = ::Myco::Component.new([
         | 
| 6 | 
            +
                ::Myco::EmptyObject,
         | 
| 7 | 
            +
                ::Myco::BasicDecorators
         | 
| 8 | 
            +
              ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 9 | 
            +
              .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 10 | 
            +
                declare_meme(:if, [], nil, ::Myco.cscope.dup) { |cond, &blk| (
         | 
| 11 | 
            +
                  ::Myco.branch_op(:"&&", cond) {blk.call}
         | 
| 12 | 
            +
                )}
         | 
| 13 | 
            +
                declare_meme(:unless, [], nil, ::Myco.cscope.dup) { |cond, &blk| (
         | 
| 14 | 
            +
                  ::Myco.branch_op(:"||", cond) {blk.call}
         | 
| 15 | 
            +
                )}
         | 
| 16 | 
            +
                declare_meme(:switch, [], nil, ::Myco.cscope.dup) { |input, comparator=:==| (
         | 
| 17 | 
            +
                  ::Myco.find_constant(:Switch).new({
         | 
| 18 | 
            +
                    :input => input,
         | 
| 19 | 
            +
                    :comparator => comparator
         | 
| 20 | 
            +
                  })
         | 
| 21 | 
            +
                )}
         | 
| 22 | 
            +
                declare_meme(:raise, [], nil, ::Myco.cscope.dup) { |*args| (
         | 
| 23 | 
            +
                  ::Kernel.instance_method(:raise).bind(self).call(*args)
         | 
| 24 | 
            +
                )}
         | 
| 25 | 
            +
                declare_meme(:loop, [], nil, ::Myco.cscope.dup) { |&block| (
         | 
| 26 | 
            +
                  ::Kernel.instance_method(:loop).bind(self).call(&block)
         | 
| 27 | 
            +
                )}
         | 
| 28 | 
            +
                declare_meme(:break, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 29 | 
            +
                  self.raise(::StopIteration)
         | 
| 30 | 
            +
                )}
         | 
| 31 | 
            +
                declare_meme(:puts, [], nil, ::Myco.cscope.dup) { |*args| (
         | 
| 32 | 
            +
                  ::Myco.find_constant(:STDOUT).puts(*args)
         | 
| 33 | 
            +
                )}
         | 
| 34 | 
            +
                declare_meme(:p, [], nil, ::Myco.cscope.dup) { |*args| (
         | 
| 35 | 
            +
                  ::Myco.find_constant(:STDOUT).puts(args.map { |a| (
         | 
| 36 | 
            +
                    a.inspect
         | 
| 37 | 
            +
                  )}.join(", "))
         | 
| 38 | 
            +
                )}
         | 
| 39 | 
            +
                declare_meme(:ruby_require, [], nil, ::Myco.cscope.dup) { |arg| (
         | 
| 40 | 
            +
                  ::Myco.find_constant(:Object).send(
         | 
| 41 | 
            +
                    :require,
         | 
| 42 | 
            +
                    arg
         | 
| 43 | 
            +
                  )
         | 
| 44 | 
            +
                )}
         | 
| 45 | 
            +
              )}}
         | 
| 46 | 
            +
              .tap { |__c__| __c__.__name__ = :BasicObject }
         | 
| 47 | 
            +
              ::Myco::Instance::BasicObject = (
         | 
| 48 | 
            +
                ::Myco::BasicObject
         | 
| 49 | 
            +
              )
         | 
| 50 | 
            +
            )}}.instance
         | 
| @@ -0,0 +1,18 @@ | |
| 1 | 
            +
            ::Myco::Component.new([
         | 
| 2 | 
            +
              ::Myco::FileToplevel
         | 
| 3 | 
            +
            ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 4 | 
            +
            .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 5 | 
            +
              ::Myco::Category = ::Myco::Component.new([
         | 
| 6 | 
            +
                ::Myco::EmptyObject
         | 
| 7 | 
            +
              ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 8 | 
            +
              .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 9 | 
            +
                declare_meme(:method_missing, [], nil, ::Myco.cscope.dup) { |sym, *a, &b| (
         | 
| 10 | 
            +
                  self.parent.send(
         | 
| 11 | 
            +
                    sym,
         | 
| 12 | 
            +
                    *a,
         | 
| 13 | 
            +
                    &b
         | 
| 14 | 
            +
                  )
         | 
| 15 | 
            +
                )}
         | 
| 16 | 
            +
              )}}
         | 
| 17 | 
            +
              .tap { |__c__| __c__.__name__ = :Category }
         | 
| 18 | 
            +
            )}}.instance
         | 
| @@ -0,0 +1,52 @@ | |
| 1 | 
            +
            ::Myco::Component.new([
         | 
| 2 | 
            +
              ::Myco::FileToplevel
         | 
| 3 | 
            +
            ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 4 | 
            +
            .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 5 | 
            +
              ::Myco::Decorator = ::Myco::Component.new([
         | 
| 6 | 
            +
                ::Myco::BasicObject
         | 
| 7 | 
            +
              ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 8 | 
            +
              .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 9 | 
            +
                declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme, *args| nil}
         | 
| 10 | 
            +
                __category__(:transforms).component_eval {(
         | 
| 11 | 
            +
                  declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme, *args| (
         | 
| 12 | 
            +
                    (self.respond_to?(:target).false? ? ::Myco::Void : self.target(meme)).tap { |x| (
         | 
| 13 | 
            +
                      meme.__send__(
         | 
| 14 | 
            +
                        :target=,
         | 
| 15 | 
            +
                        x
         | 
| 16 | 
            +
                      )
         | 
| 17 | 
            +
                    )}
         | 
| 18 | 
            +
                    (self.respond_to?(:name).false? ? ::Myco::Void : self.name(meme)).tap { |x| (
         | 
| 19 | 
            +
                      meme.__send__(
         | 
| 20 | 
            +
                        :name=,
         | 
| 21 | 
            +
                        x
         | 
| 22 | 
            +
                      )
         | 
| 23 | 
            +
                    )}
         | 
| 24 | 
            +
                    (self.respond_to?(:body).false? ? ::Myco::Void : self.body(meme)).tap { |x| (
         | 
| 25 | 
            +
                      meme.__send__(
         | 
| 26 | 
            +
                        :body=,
         | 
| 27 | 
            +
                        x
         | 
| 28 | 
            +
                      )
         | 
| 29 | 
            +
                    )}
         | 
| 30 | 
            +
                    (self.respond_to?(:cache).false? ? ::Myco::Void : self.cache(meme)).tap { |x| (
         | 
| 31 | 
            +
                      meme.__send__(
         | 
| 32 | 
            +
                        :cache=,
         | 
| 33 | 
            +
                        x
         | 
| 34 | 
            +
                      )
         | 
| 35 | 
            +
                    )}
         | 
| 36 | 
            +
                    (self.respond_to?(:var).false? ? ::Myco::Void : self.var(meme)).tap { |x| (
         | 
| 37 | 
            +
                      meme.__send__(
         | 
| 38 | 
            +
                        :var=,
         | 
| 39 | 
            +
                        x
         | 
| 40 | 
            +
                      )
         | 
| 41 | 
            +
                    )}
         | 
| 42 | 
            +
                    (self.respond_to?(:expose).false? ? ::Myco::Void : self.expose(meme)).tap { |x| (
         | 
| 43 | 
            +
                      meme.__send__(
         | 
| 44 | 
            +
                        :expose=,
         | 
| 45 | 
            +
                        x
         | 
| 46 | 
            +
                      )
         | 
| 47 | 
            +
                    )}
         | 
| 48 | 
            +
                  )}
         | 
| 49 | 
            +
                )}
         | 
| 50 | 
            +
              )}}
         | 
| 51 | 
            +
              .tap { |__c__| __c__.__name__ = :Decorator }
         | 
| 52 | 
            +
            )}}.instance
         | 
| @@ -0,0 +1,42 @@ | |
| 1 | 
            +
            ::Myco::Component.new([
         | 
| 2 | 
            +
              ::Myco::FileToplevel
         | 
| 3 | 
            +
            ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 4 | 
            +
            .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 5 | 
            +
              ::Myco::FileToplevel = ::Myco::Component.new([
         | 
| 6 | 
            +
                ::Myco::Object
         | 
| 7 | 
            +
              ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 8 | 
            +
              .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 9 | 
            +
                declare_meme(:dirname, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 10 | 
            +
                  self.component.instance_variable_get("@dirname")
         | 
| 11 | 
            +
                )}
         | 
| 12 | 
            +
                declare_meme(:basename, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 13 | 
            +
                  self.component.instance_variable_get("@basename")
         | 
| 14 | 
            +
                )}
         | 
| 15 | 
            +
                declare_meme(:filename, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 16 | 
            +
                  self.component.instance_variable_get("@filename")
         | 
| 17 | 
            +
                )}
         | 
| 18 | 
            +
                __category__(:decorators).component_eval {(
         | 
| 19 | 
            +
                  declare_meme(:import, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 20 | 
            +
                    ::Myco::Component.new([
         | 
| 21 | 
            +
                      ::Myco.find_constant(:Decorator)
         | 
| 22 | 
            +
                    ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 23 | 
            +
                    .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 24 | 
            +
                      declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme, *args| (
         | 
| 25 | 
            +
                        load_paths = [
         | 
| 26 | 
            +
                          meme.target.instance.dirname
         | 
| 27 | 
            +
                        ]
         | 
| 28 | 
            +
                        scope = meme.target.constant_scope
         | 
| 29 | 
            +
                        component = ::Myco.find_constant(:Myco).eval_file(
         | 
| 30 | 
            +
                          meme.name.to_s,
         | 
| 31 | 
            +
                          load_paths,
         | 
| 32 | 
            +
                          false,
         | 
| 33 | 
            +
                          scope
         | 
| 34 | 
            +
                        )
         | 
| 35 | 
            +
                        meme.target.include(component)
         | 
| 36 | 
            +
                      )}
         | 
| 37 | 
            +
                    )}}.instance
         | 
| 38 | 
            +
                  )}
         | 
| 39 | 
            +
                )}
         | 
| 40 | 
            +
              )}}
         | 
| 41 | 
            +
              .tap { |__c__| __c__.__name__ = :FileToplevel }
         | 
| 42 | 
            +
            )}}.instance
         | 
| @@ -0,0 +1,55 @@ | |
| 1 | 
            +
            ::Myco::Component.new([
         | 
| 2 | 
            +
              ::Myco::FileToplevel
         | 
| 3 | 
            +
            ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 4 | 
            +
            .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 5 | 
            +
              ::Myco::Object = ::Myco::Component.new([
         | 
| 6 | 
            +
                ::Myco::BasicObject
         | 
| 7 | 
            +
              ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 8 | 
            +
              .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 9 | 
            +
                declare_meme(:__signal__, [], nil, ::Myco.cscope.dup) { |name, *args, &block| (
         | 
| 10 | 
            +
                  self.component.ancestors.reverse.each { |other| (
         | 
| 11 | 
            +
                    ::Myco.branch_op(:"&&", other.__send__(
         | 
| 12 | 
            +
                      :is_a?,
         | 
| 13 | 
            +
                      ::Myco.find_constant(:Component)
         | 
| 14 | 
            +
                    )) {(
         | 
| 15 | 
            +
                      inst = ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.component.__send__(
         | 
| 16 | 
            +
                        :==,
         | 
| 17 | 
            +
                        other
         | 
| 18 | 
            +
                      )) {self}) {other.instance}
         | 
| 19 | 
            +
                      (((inst.respond_to?(:decorators).false? ? ::Myco::Void : inst.decorators).respond_to?(:on).false? ? ::Myco::Void : (inst.respond_to?(:decorators).false? ? ::Myco::Void : inst.decorators).on).respond_to?(:signal_handlers).false? ? ::Myco::Void : ((inst.respond_to?(:decorators).false? ? ::Myco::Void : inst.decorators).respond_to?(:on).false? ? ::Myco::Void : (inst.respond_to?(:decorators).false? ? ::Myco::Void : inst.decorators).on).signal_handlers(name)).each { |meme| (
         | 
| 20 | 
            +
                        meme.result_for(
         | 
| 21 | 
            +
                          self,
         | 
| 22 | 
            +
                          *args,
         | 
| 23 | 
            +
                          &block
         | 
| 24 | 
            +
                        )
         | 
| 25 | 
            +
                      )}
         | 
| 26 | 
            +
                    )}
         | 
| 27 | 
            +
                  )}
         | 
| 28 | 
            +
                )}
         | 
| 29 | 
            +
                __category__(:decorators).component_eval {(
         | 
| 30 | 
            +
                  declare_meme(:on, [
         | 
| 31 | 
            +
                    [:var, []]
         | 
| 32 | 
            +
                  ], nil, ::Myco.cscope.dup) { |*| (
         | 
| 33 | 
            +
                    ::Myco::Component.new([
         | 
| 34 | 
            +
                      ::Myco.find_constant(:Decorator)
         | 
| 35 | 
            +
                    ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 36 | 
            +
                    .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 37 | 
            +
                      declare_meme(:signal_handlers, [
         | 
| 38 | 
            +
                        [:storage, []]
         | 
| 39 | 
            +
                      ], nil, ::Myco.cscope.dup) { |*| (
         | 
| 40 | 
            +
                        ::Myco.find_constant(:Array).new
         | 
| 41 | 
            +
                      )}
         | 
| 42 | 
            +
                      declare_meme(:apply, [], nil, ::Myco.cscope.dup) { |meme| (
         | 
| 43 | 
            +
                        self.signal_handlers(meme.name).push(meme)
         | 
| 44 | 
            +
                      )}
         | 
| 45 | 
            +
                      __category__(:transforms).component_eval {(
         | 
| 46 | 
            +
                        declare_meme(:expose, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 47 | 
            +
                          false
         | 
| 48 | 
            +
                        )}
         | 
| 49 | 
            +
                      )}
         | 
| 50 | 
            +
                    )}}.instance
         | 
| 51 | 
            +
                  )}
         | 
| 52 | 
            +
                )}
         | 
| 53 | 
            +
              )}}
         | 
| 54 | 
            +
              .tap { |__c__| __c__.__name__ = :Object }
         | 
| 55 | 
            +
            )}}.instance
         | 
| @@ -0,0 +1,74 @@ | |
| 1 | 
            +
            ::Myco::Component.new([
         | 
| 2 | 
            +
              ::Myco::FileToplevel
         | 
| 3 | 
            +
            ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 4 | 
            +
            .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 5 | 
            +
              ::Myco::Switch = ::Myco::Component.new([
         | 
| 6 | 
            +
                ::Myco::Object
         | 
| 7 | 
            +
              ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 8 | 
            +
              .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 9 | 
            +
                declare_meme(:input, [
         | 
| 10 | 
            +
                  [:var, []]
         | 
| 11 | 
            +
                ], nil, ::Myco.cscope.dup) { |*| (
         | 
| 12 | 
            +
                  ::Myco::Void
         | 
| 13 | 
            +
                )}
         | 
| 14 | 
            +
                declare_meme(:output, [
         | 
| 15 | 
            +
                  [:var, []]
         | 
| 16 | 
            +
                ], nil, ::Myco.cscope.dup) { |*| (
         | 
| 17 | 
            +
                  ::Myco::Void
         | 
| 18 | 
            +
                )}
         | 
| 19 | 
            +
                declare_meme(:matched, [
         | 
| 20 | 
            +
                  [:var, []]
         | 
| 21 | 
            +
                ], nil, ::Myco.cscope.dup) { |*| (
         | 
| 22 | 
            +
                  false
         | 
| 23 | 
            +
                )}
         | 
| 24 | 
            +
                declare_meme(:comparator, [
         | 
| 25 | 
            +
                  [:var, []]
         | 
| 26 | 
            +
                ], nil, ::Myco.cscope.dup) { |*| (
         | 
| 27 | 
            +
                  :==
         | 
| 28 | 
            +
                )}
         | 
| 29 | 
            +
                declare_meme(:when, [], nil, ::Myco.cscope.dup) { |expected, &blk| (
         | 
| 30 | 
            +
                  ::Myco.branch_op(:"||", self.matched) {::Myco.branch_op(:"&&", self.input.send(
         | 
| 31 | 
            +
                    self.comparator,
         | 
| 32 | 
            +
                    expected
         | 
| 33 | 
            +
                  )) {::Myco.branch_op(:"&&", self.__send__(
         | 
| 34 | 
            +
                    :matched=,
         | 
| 35 | 
            +
                    true
         | 
| 36 | 
            +
                  )) {self.__send__(
         | 
| 37 | 
            +
                    :output=,
         | 
| 38 | 
            +
                    blk.call(self.input)
         | 
| 39 | 
            +
                  )}}}
         | 
| 40 | 
            +
                  self
         | 
| 41 | 
            +
                )}
         | 
| 42 | 
            +
                declare_meme(:when_true, [], nil, ::Myco.cscope.dup) { |&blk| (
         | 
| 43 | 
            +
                  ::Myco.branch_op(:"||", self.matched) {::Myco.branch_op(:"&&", self.input) {::Myco.branch_op(:"&&", self.__send__(
         | 
| 44 | 
            +
                    :matched=,
         | 
| 45 | 
            +
                    true
         | 
| 46 | 
            +
                  )) {self.__send__(
         | 
| 47 | 
            +
                    :output=,
         | 
| 48 | 
            +
                    blk.call(self.input)
         | 
| 49 | 
            +
                  )}}}
         | 
| 50 | 
            +
                  self
         | 
| 51 | 
            +
                )}
         | 
| 52 | 
            +
                declare_meme(:when_false, [], nil, ::Myco.cscope.dup) { |&blk| (
         | 
| 53 | 
            +
                  ::Myco.branch_op(:"||", self.matched) {::Myco.branch_op(:"||", self.input) {::Myco.branch_op(:"&&", self.__send__(
         | 
| 54 | 
            +
                    :matched=,
         | 
| 55 | 
            +
                    true
         | 
| 56 | 
            +
                  )) {self.__send__(
         | 
| 57 | 
            +
                    :output=,
         | 
| 58 | 
            +
                    blk.call(self.input)
         | 
| 59 | 
            +
                  )}}}
         | 
| 60 | 
            +
                  self
         | 
| 61 | 
            +
                )}
         | 
| 62 | 
            +
                declare_meme(:else, [], nil, ::Myco.cscope.dup) { |&blk| (
         | 
| 63 | 
            +
                  ::Myco.branch_op(:"||", self.matched) {::Myco.branch_op(:"&&", self.__send__(
         | 
| 64 | 
            +
                    :matched=,
         | 
| 65 | 
            +
                    true
         | 
| 66 | 
            +
                  )) {self.__send__(
         | 
| 67 | 
            +
                    :output=,
         | 
| 68 | 
            +
                    blk.call(self.input)
         | 
| 69 | 
            +
                  )}}
         | 
| 70 | 
            +
                  self
         | 
| 71 | 
            +
                )}
         | 
| 72 | 
            +
              )}}
         | 
| 73 | 
            +
              .tap { |__c__| __c__.__name__ = :Switch }
         | 
| 74 | 
            +
            )}}.instance
         | 
| @@ -0,0 +1,84 @@ | |
| 1 | 
            +
            ::Myco::Component.new([
         | 
| 2 | 
            +
              ::Myco::FileToplevel
         | 
| 3 | 
            +
            ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 4 | 
            +
            .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 5 | 
            +
              ::Myco.cscope.for_method_definition.const_set(:BasicCommand, ::Myco::Component.new([
         | 
| 6 | 
            +
                ::Myco.find_constant(:Object)
         | 
| 7 | 
            +
              ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 8 | 
            +
              .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 9 | 
            +
                declare_meme(:banner, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 10 | 
            +
                  ""
         | 
| 11 | 
            +
                )}
         | 
| 12 | 
            +
                declare_meme(:width, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 13 | 
            +
                  30
         | 
| 14 | 
            +
                )}
         | 
| 15 | 
            +
                declare_meme(:options_config, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 16 | 
            +
                  nil
         | 
| 17 | 
            +
                )}
         | 
| 18 | 
            +
                declare_meme(:options_parse, [], nil, ::Myco.cscope.dup) { |*argv| (
         | 
| 19 | 
            +
                  command = ::Myco.branch_op(:"&&", argv.first) {self.commands.memes.__send__(
         | 
| 20 | 
            +
                    :[],
         | 
| 21 | 
            +
                    argv.first.to_sym
         | 
| 22 | 
            +
                  )}
         | 
| 23 | 
            +
                  ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", command) {(
         | 
| 24 | 
            +
                    command.result.run(*argv.slice(::Range.new(
         | 
| 25 | 
            +
                      1,
         | 
| 26 | 
            +
                      -1
         | 
| 27 | 
            +
                    )))
         | 
| 28 | 
            +
                    nil
         | 
| 29 | 
            +
                  )}) {self.options_parser.parse(argv)}
         | 
| 30 | 
            +
                )}
         | 
| 31 | 
            +
                declare_meme(:options_parser, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 32 | 
            +
                  parser = ::Myco.find_constant(:Rubinius)::Options.new(
         | 
| 33 | 
            +
                    self.banner,
         | 
| 34 | 
            +
                    self.width,
         | 
| 35 | 
            +
                    self.options_config
         | 
| 36 | 
            +
                  )
         | 
| 37 | 
            +
                  self.options.memes.each { |name, meme| (
         | 
| 38 | 
            +
                    meme.result.register_in_parser(
         | 
| 39 | 
            +
                      parser,
         | 
| 40 | 
            +
                      name
         | 
| 41 | 
            +
                    )
         | 
| 42 | 
            +
                  )}
         | 
| 43 | 
            +
                  parser.help
         | 
| 44 | 
            +
                  parser
         | 
| 45 | 
            +
                )}
         | 
| 46 | 
            +
                declare_meme(:show_help, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 47 | 
            +
                  self.puts(self.options_parser.to_s)
         | 
| 48 | 
            +
                )}
         | 
| 49 | 
            +
                ::Myco.cscope.for_method_definition.const_set(:Option, ::Myco::Component.new([
         | 
| 50 | 
            +
                  ::Myco.find_constant(:Object)
         | 
| 51 | 
            +
                ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 52 | 
            +
                .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 53 | 
            +
                  declare_meme(:parser, [
         | 
| 54 | 
            +
                    [:var, []]
         | 
| 55 | 
            +
                  ], nil, ::Myco.cscope.dup) { |*| nil}
         | 
| 56 | 
            +
                  declare_meme(:register_in_parser, [], nil, ::Myco.cscope.dup) { |parser, name| (
         | 
| 57 | 
            +
                    self.__send__(
         | 
| 58 | 
            +
                      :parser=,
         | 
| 59 | 
            +
                      parser
         | 
| 60 | 
            +
                    )
         | 
| 61 | 
            +
                    args = [
         | 
| 62 | 
            +
                      name,
         | 
| 63 | 
            +
                      ::Myco.branch_op(:"??", (self.respond_to?(:argument).false? ? ::Myco::Void : self.argument)) {nil},
         | 
| 64 | 
            +
                      self.long_form,
         | 
| 65 | 
            +
                      self.description
         | 
| 66 | 
            +
                    ]
         | 
| 67 | 
            +
                    args = args.compact
         | 
| 68 | 
            +
                    args = args.map { |arg| (
         | 
| 69 | 
            +
                      arg.to_s
         | 
| 70 | 
            +
                    )}
         | 
| 71 | 
            +
                    parser.on(*args) { |arg| (
         | 
| 72 | 
            +
                      self.__send__(
         | 
| 73 | 
            +
                        :do,
         | 
| 74 | 
            +
                        arg
         | 
| 75 | 
            +
                      )
         | 
| 76 | 
            +
                    )}
         | 
| 77 | 
            +
                  )}
         | 
| 78 | 
            +
                )}})
         | 
| 79 | 
            +
                .tap { |__c__| __c__.__name__ = :Option }
         | 
| 80 | 
            +
                __category__(:options).component_eval {nil}
         | 
| 81 | 
            +
                __category__(:commands).component_eval {nil}
         | 
| 82 | 
            +
              )}})
         | 
| 83 | 
            +
              .tap { |__c__| __c__.__name__ = :BasicCommand }
         | 
| 84 | 
            +
            )}}.instance
         | 
| @@ -0,0 +1,136 @@ | |
| 1 | 
            +
            ::Myco::Component.new([
         | 
| 2 | 
            +
              ::Myco::FileToplevel
         | 
| 3 | 
            +
            ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 4 | 
            +
            .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 5 | 
            +
              declare_meme(:"OptionParser.my", [
         | 
| 6 | 
            +
                [:import, []]
         | 
| 7 | 
            +
              ], nil, ::Myco.cscope.dup) { |*| nil}
         | 
| 8 | 
            +
              ::Myco::Component.new([
         | 
| 9 | 
            +
                ::Myco.find_constant(:Object)
         | 
| 10 | 
            +
              ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 11 | 
            +
              .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 12 | 
            +
                declare_meme(:options, [
         | 
| 13 | 
            +
                  [:var, []]
         | 
| 14 | 
            +
                ], nil, ::Myco.cscope.dup) { |*| (
         | 
| 15 | 
            +
                  ::Myco::Component.new([
         | 
| 16 | 
            +
                    ::Myco.find_constant(:OptionParser)
         | 
| 17 | 
            +
                  ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 18 | 
            +
                  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 19 | 
            +
                    declare_meme(:results, [
         | 
| 20 | 
            +
                      [:var, []]
         | 
| 21 | 
            +
                    ], nil, ::Myco.cscope.dup) { |*| (
         | 
| 22 | 
            +
                      nil
         | 
| 23 | 
            +
                    )}
         | 
| 24 | 
            +
                    __category__(:options).component_eval {(
         | 
| 25 | 
            +
                      declare_meme(:"-A", [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 26 | 
            +
                        ::Myco::Component.new([
         | 
| 27 | 
            +
                          ::Myco.find_constant(:Option)
         | 
| 28 | 
            +
                        ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 29 | 
            +
                        .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 30 | 
            +
                          declare_meme(:description, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 31 | 
            +
                            "Print an ascii graph of the AST"
         | 
| 32 | 
            +
                          )}
         | 
| 33 | 
            +
                          declare_meme(:long_form, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 34 | 
            +
                            "--print-ast"
         | 
| 35 | 
            +
                          )}
         | 
| 36 | 
            +
                          declare_meme(:do, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 37 | 
            +
                            self.__send__(
         | 
| 38 | 
            +
                              :results=,
         | 
| 39 | 
            +
                              ::Myco.find_constant(:Myco)::ToolSet::Compiler::ASTPrinter,
         | 
| 40 | 
            +
                              :print_ast
         | 
| 41 | 
            +
                            )
         | 
| 42 | 
            +
                          )}
         | 
| 43 | 
            +
                        )}}.instance
         | 
| 44 | 
            +
                      )}
         | 
| 45 | 
            +
                      declare_meme(:"-S", [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 46 | 
            +
                        ::Myco::Component.new([
         | 
| 47 | 
            +
                          ::Myco.find_constant(:Option)
         | 
| 48 | 
            +
                        ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 49 | 
            +
                        .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 50 | 
            +
                          declare_meme(:description, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 51 | 
            +
                            "Print the AST as an S-expression"
         | 
| 52 | 
            +
                          )}
         | 
| 53 | 
            +
                          declare_meme(:long_form, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 54 | 
            +
                            "--print-sexp"
         | 
| 55 | 
            +
                          )}
         | 
| 56 | 
            +
                          declare_meme(:do, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 57 | 
            +
                            self.__send__(
         | 
| 58 | 
            +
                              :results=,
         | 
| 59 | 
            +
                              ::Myco.find_constant(:Myco)::ToolSet::Compiler::SexpPrinter,
         | 
| 60 | 
            +
                              :print_ast
         | 
| 61 | 
            +
                            )
         | 
| 62 | 
            +
                          )}
         | 
| 63 | 
            +
                        )}}.instance
         | 
| 64 | 
            +
                      )}
         | 
| 65 | 
            +
                      declare_meme(:"-B", [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 66 | 
            +
                        ::Myco::Component.new([
         | 
| 67 | 
            +
                          ::Myco.find_constant(:Option)
         | 
| 68 | 
            +
                        ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 69 | 
            +
                        .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 70 | 
            +
                          declare_meme(:description, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 71 | 
            +
                            "Print bytecode for compiled methods"
         | 
| 72 | 
            +
                          )}
         | 
| 73 | 
            +
                          declare_meme(:long_form, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 74 | 
            +
                            "--print-bytecode"
         | 
| 75 | 
            +
                          )}
         | 
| 76 | 
            +
                          declare_meme(:do, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 77 | 
            +
                            self.__send__(
         | 
| 78 | 
            +
                              :results=,
         | 
| 79 | 
            +
                              true,
         | 
| 80 | 
            +
                              :print_bytecode
         | 
| 81 | 
            +
                            )
         | 
| 82 | 
            +
                          )}
         | 
| 83 | 
            +
                        )}}.instance
         | 
| 84 | 
            +
                      )}
         | 
| 85 | 
            +
                      declare_meme(:"-e", [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 86 | 
            +
                        ::Myco::Component.new([
         | 
| 87 | 
            +
                          ::Myco.find_constant(:Option)
         | 
| 88 | 
            +
                        ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
         | 
| 89 | 
            +
                        .tap { |__c__| __c__.__last__ = __c__.component_eval {(
         | 
| 90 | 
            +
                          declare_meme(:argument, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 91 | 
            +
                            "STRING"
         | 
| 92 | 
            +
                          )}
         | 
| 93 | 
            +
                          declare_meme(:description, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 94 | 
            +
                            "Compile STRING"
         | 
| 95 | 
            +
                          )}
         | 
| 96 | 
            +
                          declare_meme(:long_form, [], nil, ::Myco.cscope.dup) { |*| (
         | 
| 97 | 
            +
                            "--evaluate"
         | 
| 98 | 
            +
                          )}
         | 
| 99 | 
            +
                          declare_meme(:do, [], nil, ::Myco.cscope.dup) { |arg| (
         | 
| 100 | 
            +
                            self.__send__(
         | 
| 101 | 
            +
                              :results=,
         | 
| 102 | 
            +
                              arg,
         | 
| 103 | 
            +
                              :string
         | 
| 104 | 
            +
                            )
         | 
| 105 | 
            +
                          )}
         | 
| 106 | 
            +
                        )}}.instance
         | 
| 107 | 
            +
                      )}
         | 
| 108 | 
            +
                    )}
         | 
| 109 | 
            +
                  )}}.instance
         | 
| 110 | 
            +
                )}
         | 
| 111 | 
            +
                declare_meme(:run, [], nil, ::Myco.cscope.dup) { |*argv| (
         | 
| 112 | 
            +
                  self.options.parse(argv)
         | 
| 113 | 
            +
                  print_ast = ::Myco.branch_op(:"||", self.options.results(:print_ast)) {false}
         | 
| 114 | 
            +
                  string = ::Myco.branch_op(:"||", self.options.results(:string)) {""}
         | 
| 115 | 
            +
                  compiler = ::Myco::ToolSet::Compiler
         | 
| 116 | 
            +
                  compiler = compiler.new(
         | 
| 117 | 
            +
                    :string,
         | 
| 118 | 
            +
                    :compiled_code
         | 
| 119 | 
            +
                  )
         | 
| 120 | 
            +
                  parser = compiler.parser
         | 
| 121 | 
            +
                  parser.root(::Myco::ToolSet::AST::Script)
         | 
| 122 | 
            +
                  parser.input(
         | 
| 123 | 
            +
                    string,
         | 
| 124 | 
            +
                    "(mycompile)",
         | 
| 125 | 
            +
                    1
         | 
| 126 | 
            +
                  )
         | 
| 127 | 
            +
                  self.__send__(
         | 
| 128 | 
            +
                    :if,
         | 
| 129 | 
            +
                    print_ast
         | 
| 130 | 
            +
                  ) { || (
         | 
| 131 | 
            +
                    compiler.parser.print(print_ast)
         | 
| 132 | 
            +
                  )}
         | 
| 133 | 
            +
                  compiler.run
         | 
| 134 | 
            +
                )}
         | 
| 135 | 
            +
              )}}.instance
         | 
| 136 | 
            +
            )}}.instance
         | 
    
        data/lib/myco/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: myco
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Joe McIlvain
         | 
| @@ -11,187 +11,173 @@ cert_chain: [] | |
| 11 11 | 
             
            date: 2015-02-18 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 | 
            -
               | 
| 15 | 
            -
                requirements:
         | 
| 16 | 
            -
                - - "~>"
         | 
| 17 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 18 | 
            -
                    version: '2.3'
         | 
| 19 | 
            -
              name: rubinius-toolset
         | 
| 14 | 
            +
              type: :runtime
         | 
| 20 15 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 21 16 | 
             
                requirements:
         | 
| 22 17 | 
             
                - - "~>"
         | 
| 23 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 24 19 | 
             
                    version: '2.3'
         | 
| 25 | 
            -
               | 
| 20 | 
            +
              name: rubinius-toolset
         | 
| 26 21 | 
             
              prerelease: false
         | 
| 27 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 28 22 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 29 23 | 
             
                requirements:
         | 
| 30 24 | 
             
                - - "~>"
         | 
| 31 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 32 | 
            -
                    version: '2. | 
| 33 | 
            -
             | 
| 26 | 
            +
                    version: '2.3'
         | 
| 27 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 28 | 
            +
              type: :runtime
         | 
| 34 29 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 35 30 | 
             
                requirements:
         | 
| 36 31 | 
             
                - - "~>"
         | 
| 37 32 | 
             
                  - !ruby/object:Gem::Version
         | 
| 38 33 | 
             
                    version: '2.2'
         | 
| 39 | 
            -
               | 
| 34 | 
            +
              name: rubinius-melbourne
         | 
| 40 35 | 
             
              prerelease: false
         | 
| 41 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 42 36 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 43 37 | 
             
                requirements:
         | 
| 44 38 | 
             
                - - "~>"
         | 
| 45 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 46 40 | 
             
                    version: '2.2'
         | 
| 47 | 
            -
             | 
| 41 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            +
              type: :runtime
         | 
| 48 43 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 49 44 | 
             
                requirements:
         | 
| 50 45 | 
             
                - - "~>"
         | 
| 51 46 | 
             
                  - !ruby/object:Gem::Version
         | 
| 52 47 | 
             
                    version: '2.2'
         | 
| 53 | 
            -
               | 
| 48 | 
            +
              name: rubinius-processor
         | 
| 54 49 | 
             
              prerelease: false
         | 
| 55 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 56 50 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 57 51 | 
             
                requirements:
         | 
| 58 52 | 
             
                - - "~>"
         | 
| 59 53 | 
             
                  - !ruby/object:Gem::Version
         | 
| 60 54 | 
             
                    version: '2.2'
         | 
| 61 | 
            -
             | 
| 55 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 56 | 
            +
              type: :runtime
         | 
| 62 57 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 63 58 | 
             
                requirements:
         | 
| 64 59 | 
             
                - - "~>"
         | 
| 65 60 | 
             
                  - !ruby/object:Gem::Version
         | 
| 66 61 | 
             
                    version: '2.2'
         | 
| 67 | 
            -
               | 
| 62 | 
            +
              name: rubinius-compiler
         | 
| 68 63 | 
             
              prerelease: false
         | 
| 69 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 70 64 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 71 65 | 
             
                requirements:
         | 
| 72 66 | 
             
                - - "~>"
         | 
| 73 67 | 
             
                  - !ruby/object:Gem::Version
         | 
| 74 68 | 
             
                    version: '2.2'
         | 
| 75 | 
            -
             | 
| 69 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 70 | 
            +
              type: :runtime
         | 
| 76 71 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 77 72 | 
             
                requirements:
         | 
| 78 73 | 
             
                - - "~>"
         | 
| 79 74 | 
             
                  - !ruby/object:Gem::Version
         | 
| 80 75 | 
             
                    version: '2.2'
         | 
| 81 | 
            -
               | 
| 76 | 
            +
              name: rubinius-ast
         | 
| 82 77 | 
             
              prerelease: false
         | 
| 83 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 84 78 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 85 79 | 
             
                requirements:
         | 
| 86 80 | 
             
                - - "~>"
         | 
| 87 81 | 
             
                  - !ruby/object:Gem::Version
         | 
| 88 | 
            -
                    version: ' | 
| 89 | 
            -
             | 
| 82 | 
            +
                    version: '2.2'
         | 
| 83 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 84 | 
            +
              type: :development
         | 
| 90 85 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 91 86 | 
             
                requirements:
         | 
| 92 87 | 
             
                - - "~>"
         | 
| 93 88 | 
             
                  - !ruby/object:Gem::Version
         | 
| 94 89 | 
             
                    version: '1.0'
         | 
| 95 | 
            -
               | 
| 90 | 
            +
              name: kpeg
         | 
| 96 91 | 
             
              prerelease: false
         | 
| 97 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 98 92 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 99 93 | 
             
                requirements:
         | 
| 100 94 | 
             
                - - "~>"
         | 
| 101 95 | 
             
                  - !ruby/object:Gem::Version
         | 
| 102 | 
            -
                    version: '1. | 
| 103 | 
            -
             | 
| 96 | 
            +
                    version: '1.0'
         | 
| 97 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 98 | 
            +
              type: :development
         | 
| 104 99 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 105 100 | 
             
                requirements:
         | 
| 106 101 | 
             
                - - "~>"
         | 
| 107 102 | 
             
                  - !ruby/object:Gem::Version
         | 
| 108 103 | 
             
                    version: '1.6'
         | 
| 109 | 
            -
               | 
| 104 | 
            +
              name: bundler
         | 
| 110 105 | 
             
              prerelease: false
         | 
| 111 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 112 106 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 113 107 | 
             
                requirements:
         | 
| 114 108 | 
             
                - - "~>"
         | 
| 115 109 | 
             
                  - !ruby/object:Gem::Version
         | 
| 116 | 
            -
                    version: ' | 
| 117 | 
            -
             | 
| 110 | 
            +
                    version: '1.6'
         | 
| 111 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 112 | 
            +
              type: :development
         | 
| 118 113 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 119 114 | 
             
                requirements:
         | 
| 120 115 | 
             
                - - "~>"
         | 
| 121 116 | 
             
                  - !ruby/object:Gem::Version
         | 
| 122 117 | 
             
                    version: '10.3'
         | 
| 123 | 
            -
               | 
| 118 | 
            +
              name: rake
         | 
| 124 119 | 
             
              prerelease: false
         | 
| 125 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 126 120 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 127 121 | 
             
                requirements:
         | 
| 128 122 | 
             
                - - "~>"
         | 
| 129 123 | 
             
                  - !ruby/object:Gem::Version
         | 
| 130 | 
            -
                    version: ' | 
| 131 | 
            -
             | 
| 124 | 
            +
                    version: '10.3'
         | 
| 125 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 126 | 
            +
              type: :development
         | 
| 132 127 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 133 128 | 
             
                requirements:
         | 
| 134 129 | 
             
                - - "~>"
         | 
| 135 130 | 
             
                  - !ruby/object:Gem::Version
         | 
| 136 131 | 
             
                    version: '0.9'
         | 
| 137 | 
            -
               | 
| 132 | 
            +
              name: pry
         | 
| 138 133 | 
             
              prerelease: false
         | 
| 139 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 140 134 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 141 135 | 
             
                requirements:
         | 
| 142 136 | 
             
                - - "~>"
         | 
| 143 137 | 
             
                  - !ruby/object:Gem::Version
         | 
| 144 | 
            -
                    version: ' | 
| 145 | 
            -
             | 
| 138 | 
            +
                    version: '0.9'
         | 
| 139 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 140 | 
            +
              type: :development
         | 
| 146 141 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 147 142 | 
             
                requirements:
         | 
| 148 143 | 
             
                - - "~>"
         | 
| 149 144 | 
             
                  - !ruby/object:Gem::Version
         | 
| 150 145 | 
             
                    version: '1.4'
         | 
| 151 | 
            -
               | 
| 146 | 
            +
              name: pry-rescue
         | 
| 152 147 | 
             
              prerelease: false
         | 
| 153 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 154 148 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 155 149 | 
             
                requirements:
         | 
| 156 150 | 
             
                - - "~>"
         | 
| 157 151 | 
             
                  - !ruby/object:Gem::Version
         | 
| 158 | 
            -
                    version: ' | 
| 159 | 
            -
             | 
| 152 | 
            +
                    version: '1.4'
         | 
| 153 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 154 | 
            +
              type: :development
         | 
| 160 155 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 161 156 | 
             
                requirements:
         | 
| 162 157 | 
             
                - - "~>"
         | 
| 163 158 | 
             
                  - !ruby/object:Gem::Version
         | 
| 164 159 | 
             
                    version: '3.0'
         | 
| 165 | 
            -
               | 
| 160 | 
            +
              name: rspec
         | 
| 166 161 | 
             
              prerelease: false
         | 
| 167 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 168 162 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 169 163 | 
             
                requirements:
         | 
| 170 164 | 
             
                - - "~>"
         | 
| 171 165 | 
             
                  - !ruby/object:Gem::Version
         | 
| 172 | 
            -
                    version: ' | 
| 173 | 
            -
              name: rspec-its
         | 
| 174 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 175 | 
            -
                requirements:
         | 
| 176 | 
            -
                - - "~>"
         | 
| 177 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 178 | 
            -
                    version: '1.0'
         | 
| 179 | 
            -
              type: :development
         | 
| 180 | 
            -
              prerelease: false
         | 
| 166 | 
            +
                    version: '3.0'
         | 
| 181 167 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 182 | 
            -
               | 
| 168 | 
            +
              type: :development
         | 
| 169 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 183 170 | 
             
                requirements:
         | 
| 184 171 | 
             
                - - "~>"
         | 
| 185 172 | 
             
                  - !ruby/object:Gem::Version
         | 
| 186 173 | 
             
                    version: '1.3'
         | 
| 187 174 | 
             
              name: fivemat
         | 
| 188 | 
            -
               | 
| 175 | 
            +
              prerelease: false
         | 
| 176 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 189 177 | 
             
                requirements:
         | 
| 190 178 | 
             
                - - "~>"
         | 
| 191 179 | 
             
                  - !ruby/object:Gem::Version
         | 
| 192 180 | 
             
                    version: '1.3'
         | 
| 193 | 
            -
              type: :development
         | 
| 194 | 
            -
              prerelease: false
         | 
| 195 181 | 
             
            description: An experimental language on the Rubinius VM
         | 
| 196 182 | 
             
            email: joe.eli.mac@gmail.com
         | 
| 197 183 | 
             
            executables:
         | 
| @@ -205,6 +191,7 @@ files: | |
| 205 191 | 
             
            - lib/myco.rb
         | 
| 206 192 | 
             
            - lib/myco/backtrace.rb
         | 
| 207 193 | 
             
            - lib/myco/bootstrap.my
         | 
| 194 | 
            +
            - lib/myco/bootstrap.my.rb
         | 
| 208 195 | 
             
            - lib/myco/bootstrap.rb
         | 
| 209 196 | 
             
            - lib/myco/bootstrap/component.rb
         | 
| 210 197 | 
             
            - lib/myco/bootstrap/empty_object.rb
         | 
| @@ -215,15 +202,23 @@ files: | |
| 215 202 | 
             
            - lib/myco/bootstrap/void.rb
         | 
| 216 203 | 
             
            - lib/myco/code_loader.rb
         | 
| 217 204 | 
             
            - lib/myco/command.my
         | 
| 205 | 
            +
            - lib/myco/command.my.rb
         | 
| 218 206 | 
             
            - lib/myco/command/inoculate.my
         | 
| 207 | 
            +
            - lib/myco/command/inoculate.my.rb
         | 
| 219 208 | 
             
            - lib/myco/core/BasicDecorators.my
         | 
| 209 | 
            +
            - lib/myco/core/BasicDecorators.my.rb
         | 
| 220 210 | 
             
            - lib/myco/core/BasicObject.my
         | 
| 211 | 
            +
            - lib/myco/core/BasicObject.my.rb
         | 
| 221 212 | 
             
            - lib/myco/core/Category.my
         | 
| 213 | 
            +
            - lib/myco/core/Category.my.rb
         | 
| 222 214 | 
             
            - lib/myco/core/Decorator.my
         | 
| 215 | 
            +
            - lib/myco/core/Decorator.my.rb
         | 
| 223 216 | 
             
            - lib/myco/core/FileToplevel.my
         | 
| 224 | 
            -
            - lib/myco/core/ | 
| 217 | 
            +
            - lib/myco/core/FileToplevel.my.rb
         | 
| 225 218 | 
             
            - lib/myco/core/Object.my
         | 
| 219 | 
            +
            - lib/myco/core/Object.my.rb
         | 
| 226 220 | 
             
            - lib/myco/core/Switch.my
         | 
| 221 | 
            +
            - lib/myco/core/Switch.my.rb
         | 
| 227 222 | 
             
            - lib/myco/eval.rb
         | 
| 228 223 | 
             
            - lib/myco/misc.rb
         | 
| 229 224 | 
             
            - lib/myco/parser.rb
         | 
| @@ -286,8 +281,9 @@ files: | |
| 286 281 | 
             
            - lib/myco/parser/ast/to_ruby/void_literal.rb
         | 
| 287 282 | 
             
            - lib/myco/parser/peg_parser.rb
         | 
| 288 283 | 
             
            - lib/myco/tools/BasicCommand.my
         | 
| 289 | 
            -
            - lib/myco/tools/ | 
| 284 | 
            +
            - lib/myco/tools/BasicCommand.my.rb
         | 
| 290 285 | 
             
            - lib/myco/tools/mycompile.my
         | 
| 286 | 
            +
            - lib/myco/tools/mycompile.my.rb
         | 
| 291 287 | 
             
            - lib/myco/toolset.rb
         | 
| 292 288 | 
             
            - lib/myco/version.rb
         | 
| 293 289 | 
             
            homepage: https://github.com/jemc/myco/
         | 
| @@ -315,3 +311,4 @@ signing_key: | |
| 315 311 | 
             
            specification_version: 4
         | 
| 316 312 | 
             
            summary: An experimental language on the Rubinius VM
         | 
| 317 313 | 
             
            test_files: []
         | 
| 314 | 
            +
            has_rdoc: 
         | 
    
        data/lib/myco/core/Myco.my
    DELETED
    
    
    
        data/lib/myco/tools/Generator.my
    DELETED
    
    | @@ -1,18 +0,0 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
            Myco::Generator < Object {
         | 
| 3 | 
            -
              
         | 
| 4 | 
            -
            }
         | 
| 5 | 
            -
             | 
| 6 | 
            -
            Myco::Generator {
         | 
| 7 | 
            -
              
         | 
| 8 | 
            -
              task: rand ** rand
         | 
| 9 | 
            -
              
         | 
| 10 | 
            -
              work: 100000.times { task }
         | 
| 11 | 
            -
              
         | 
| 12 | 
            -
              on creation: {
         | 
| 13 | 
            -
                ruby_require('rubinius/profiler')
         | 
| 14 | 
            -
                prof = Rubinius::Profiler::Instrumenter.new
         | 
| 15 | 
            -
                prof.profile { work }
         | 
| 16 | 
            -
                prof.show
         | 
| 17 | 
            -
              }
         | 
| 18 | 
            -
            }
         |