From 5fdf2b62f1f97026f76c0336a225f8b510762b46 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 16 Sep 2021 20:16:22 -0400 Subject: Adapted Lua, Python and Ruby compilers to the new variant format. --- lux-ruby/project.clj | 2 +- lux-ruby/source/program.lux | 17 ++++------------- 2 files changed, 5 insertions(+), 14 deletions(-) (limited to 'lux-ruby') diff --git a/lux-ruby/project.clj b/lux-ruby/project.clj index 88b172b40..36430ec9a 100644 --- a/lux-ruby/project.clj +++ b/lux-ruby/project.clj @@ -20,7 +20,7 @@ ["snapshots" {:url ~sonatype-snapshots :creds :gpg}]] :plugins [[com.github.luxlang/lein-luxc ~version]] - :dependencies [[com.github.luxlang/luxc-jvm ~version] + :dependencies [[com.github.luxlang/lux-bootstrapper ~version] [com.github.luxlang/stdlib ~version] [org.jruby/jruby-complete "9.2.15.0"]] diff --git a/lux-ruby/source/program.lux b/lux-ruby/source/program.lux index f2e429d15..ee569e392 100644 --- a/lux-ruby/source/program.lux +++ b/lux-ruby/source/program.lux @@ -28,8 +28,7 @@ ["[0]" list]]] ["[0]" macro [syntax {"+" syntax:}] - ["[0]" template] - ["[0]" code]] + ["[0]" template]] [math [number {"+" hex} ["n" nat] @@ -132,14 +131,6 @@ ["[1]::[0]" (getValue [] java/lang/Object)]) -(syntax: (method_inputs [input_classes (.tuple (<>.some .any))]) - (monad.each meta.monad - (function (_ class) - (do meta.monad - [var (macro.symbol "input")] - (in (code.record (list [var class]))))) - input_classes)) - (import: org/jruby/runtime/JavaSites$CheckedSites) (import: org/jruby/runtime/builtin/Variable) (import: org/jruby/runtime/builtin/InstanceVariables) @@ -609,12 +600,12 @@ output)))))] (: (Host _.Expression _.Statement) (implementation - (def: (evaluate! context code) + (def: (evaluate context code) (run! code)) - (def: execute! run!) + (def: execute run!) - (def: (define! context custom input) + (def: (define context custom input) (let [global (maybe.else (reference.artifact context) custom) @global (_.global global)] -- cgit v1.2.3