Skip to content

Commit

Permalink
Propagate rename throughout codebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Dec 28, 2012
1 parent c8afd41 commit 2bc3204
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 70 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ task :generate, [:file_name] => [:jruby_check] do |t, args|
Dir.chdir("#{File.dirname(__FILE__)}")
file_name = args[:file_name]
raise "must specify file to generate" unless file_name && File.exists?(file_name)
sh "jruby -I target:src/main/ruby src/main/ruby/fast_ruby.rb #{file_name}"
sh "jruby -I target:src/main/ruby src/main/ruby/ruby_flux.rb #{file_name}"
end

desc "Compile the java source to bytecode"
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<modelVersion>4.0.0</modelVersion>

<groupId>com.headius</groupId>
<artifactId>fastruby</artifactId>
<artifactId>ruby_flux</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>fastruby</name>
<name>ruby_flux</name>
<url>http://maven.apache.org</url>

<properties>
Expand Down
Binary file removed src/main/ruby/.compiler.rb.swp
Binary file not shown.
20 changes: 10 additions & 10 deletions src/main/ruby/fast_ruby.rb → src/main/ruby/ruby_flux.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
require 'jruby'
require 'java'
require 'fastruby-1.0-SNAPSHOT.jar'
require 'ruby_flux-1.0-SNAPSHOT.jar'
require 'fileutils'

require 'fast_ruby/compiler'
require 'fast_ruby/class_compiler'
require 'fast_ruby/method_compiler'
require 'fast_ruby/body_compiler'
require 'fast_ruby/statement_compiler'
require 'fast_ruby/expression_compiler'
require 'ruby_flux/compiler'
require 'ruby_flux/class_compiler'
require 'ruby_flux/method_compiler'
require 'ruby_flux/body_compiler'
require 'ruby_flux/statement_compiler'
require 'ruby_flux/expression_compiler'

module FastRuby
module RubyFlux
BUILTINS = %w[puts print]

Char = java.lang.Character
Expand Down Expand Up @@ -38,8 +38,8 @@ module FastRuby

if __FILE__ == $0
if ARGV[0] == '-e'
FastRuby::Compiler.new('-e', ARGV[1]).compile
RubyFlux::Compiler.new('-e', ARGV[1]).compile
else
FastRuby::Compiler.new(ARGV).compile
RubyFlux::Compiler.new(ARGV).compile
end
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module FastRuby
module RubyFlux
class BodyCompiler
def initialize(ast, method_compiler, node, do_declare, do_return)
@ast, @method_compiler, @node, @do_declare, @do_return = ast, method_compiler, node, do_declare, do_return
Expand Down Expand Up @@ -54,4 +54,4 @@ def start
body
end
end
end
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'fast_ruby/jdt_utils'
require 'ruby_flux/jdt_utils'

module FastRuby
module RubyFlux
class ClassCompiler
include JDTUtils

Expand Down Expand Up @@ -63,4 +63,4 @@ def define_main
class_decl.body_declarations << main_method
end
end
end
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'fast_ruby/jdt_utils'
require 'ruby_flux/jdt_utils'

module FastRuby
module RubyFlux
class Compiler
include JDTUtils

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'fast_ruby/jdt_utils'
require 'ruby_flux/jdt_utils'

module FastRuby
module RubyFlux
class ExpressionCompiler
include JDTUtils

Expand Down Expand Up @@ -346,4 +346,4 @@ def proper_class(name)
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module FastRuby
module RubyFlux
module JDTUtils
def source_to_document(source)
document = Document.new
Expand All @@ -24,4 +24,4 @@ def new_source
cu
end
end
end
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'fast_ruby/jdt_utils'
require 'ruby_flux/jdt_utils'

module FastRuby
module RubyFlux
class MethodCompiler
include JDTUtils

Expand Down Expand Up @@ -99,4 +99,4 @@ def safe_name(name)
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'fast_ruby/jdt_utils'
require 'ruby_flux/jdt_utils'

module FastRuby
module RubyFlux
class StatementCompiler
include JDTUtils

Expand Down Expand Up @@ -46,4 +46,4 @@ def start
end
end
end
end
end
38 changes: 0 additions & 38 deletions src/test/java/com/headius/fastruby/AppTest.java

This file was deleted.

2 changes: 1 addition & 1 deletion src/test/ruby/gen_code.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'fastruby-1.0-SNAPSHOT.jar'
require 'ruby_flux-1.0-SNAPSHOT.jar'

java_import org.eclipse.jdt.core.dom.AST
java_import org.eclipse.jdt.core.dom.ASTParser
Expand Down

0 comments on commit 2bc3204

Please sign in to comment.