diff --git a/lib/vool.rb b/lib/vool.rb index 7267beaf..44481fc5 100644 --- a/lib/vool.rb +++ b/lib/vool.rb @@ -3,19 +3,4 @@ module Vool end end -require_relative "vool/array_statement" -require_relative "vool/assignment_statement" -require_relative "vool/basic_values" -require_relative "vool/class_statement" -require_relative "vool/hash_statement" -require_relative "vool/if_statement" -require_relative "vool/logical_statement" -require_relative "vool/method_statement" - -require_relative "vool/return_statement" -require_relative "vool/statements" -require_relative "vool/send_statement" -require_relative "vool/variables" -require_relative "vool/while_statement" - require_relative "vool/ruby_compiler" diff --git a/lib/vool/ruby_compiler.rb b/lib/vool/ruby_compiler.rb index aab41661..1f8e5b58 100644 --- a/lib/vool/ruby_compiler.rb +++ b/lib/vool/ruby_compiler.rb @@ -1,3 +1,18 @@ +require_relative "statements/array_statement" +require_relative "statements/assignment_statement" +require_relative "statements/basic_values" +require_relative "statements/class_statement" +require_relative "statements/hash_statement" +require_relative "statements/if_statement" +require_relative "statements/logical_statement" +require_relative "statements/method_statement" + +require_relative "statements/return_statement" +require_relative "statements/statements" +require_relative "statements/send_statement" +require_relative "statements/variables" +require_relative "statements/while_statement" + module Vool # This RubyCompiler compiles incoming ruby (string) into vools internal representation # with the help of the parser gem. The parser outputs an abstract ast (nodes) diff --git a/lib/vool/array_statement.rb b/lib/vool/statements/array_statement.rb similarity index 100% rename from lib/vool/array_statement.rb rename to lib/vool/statements/array_statement.rb diff --git a/lib/vool/assignment_statement.rb b/lib/vool/statements/assignment_statement.rb similarity index 100% rename from lib/vool/assignment_statement.rb rename to lib/vool/statements/assignment_statement.rb diff --git a/lib/vool/basic_values.rb b/lib/vool/statements/basic_values.rb similarity index 100% rename from lib/vool/basic_values.rb rename to lib/vool/statements/basic_values.rb diff --git a/lib/vool/class_statement.rb b/lib/vool/statements/class_statement.rb similarity index 100% rename from lib/vool/class_statement.rb rename to lib/vool/statements/class_statement.rb diff --git a/lib/vool/hash_statement.rb b/lib/vool/statements/hash_statement.rb similarity index 100% rename from lib/vool/hash_statement.rb rename to lib/vool/statements/hash_statement.rb diff --git a/lib/vool/if_statement.rb b/lib/vool/statements/if_statement.rb similarity index 100% rename from lib/vool/if_statement.rb rename to lib/vool/statements/if_statement.rb diff --git a/lib/vool/logical_statement.rb b/lib/vool/statements/logical_statement.rb similarity index 100% rename from lib/vool/logical_statement.rb rename to lib/vool/statements/logical_statement.rb diff --git a/lib/vool/method_statement.rb b/lib/vool/statements/method_statement.rb similarity index 100% rename from lib/vool/method_statement.rb rename to lib/vool/statements/method_statement.rb diff --git a/lib/vool/return_statement.rb b/lib/vool/statements/return_statement.rb similarity index 100% rename from lib/vool/return_statement.rb rename to lib/vool/statements/return_statement.rb diff --git a/lib/vool/send_statement.rb b/lib/vool/statements/send_statement.rb similarity index 100% rename from lib/vool/send_statement.rb rename to lib/vool/statements/send_statement.rb diff --git a/lib/vool/statements.rb b/lib/vool/statements/statements.rb similarity index 100% rename from lib/vool/statements.rb rename to lib/vool/statements/statements.rb diff --git a/lib/vool/variables.rb b/lib/vool/statements/variables.rb similarity index 100% rename from lib/vool/variables.rb rename to lib/vool/statements/variables.rb diff --git a/lib/vool/while_statement.rb b/lib/vool/statements/while_statement.rb similarity index 100% rename from lib/vool/while_statement.rb rename to lib/vool/statements/while_statement.rb diff --git a/test/vool/statements/helper.rb b/test/vool/statements/helper.rb new file mode 100644 index 00000000..26258082 --- /dev/null +++ b/test/vool/statements/helper.rb @@ -0,0 +1 @@ +require_relative "../helper" diff --git a/test/vool/statements/test_all.rb b/test/vool/statements/test_all.rb new file mode 100644 index 00000000..2638b7b2 --- /dev/null +++ b/test/vool/statements/test_all.rb @@ -0,0 +1,12 @@ +require_relative "test_array_statement" +require_relative "test_assignment_statement" +require_relative "test_basic_values" +require_relative "test_class_statement" +require_relative "test_hash_statement" +require_relative "test_if_statement" +require_relative "test_logical_statement" +require_relative "test_method_statement" +require_relative "test_return_statement" +require_relative "test_send_statement" +require_relative "test_variables" +require_relative "test_while_statement" diff --git a/test/vool/test_array_statement.rb b/test/vool/statements/test_array_statement.rb similarity index 100% rename from test/vool/test_array_statement.rb rename to test/vool/statements/test_array_statement.rb diff --git a/test/vool/test_assignment_statement.rb b/test/vool/statements/test_assignment_statement.rb similarity index 100% rename from test/vool/test_assignment_statement.rb rename to test/vool/statements/test_assignment_statement.rb diff --git a/test/vool/test_basic_values.rb b/test/vool/statements/test_basic_values.rb similarity index 100% rename from test/vool/test_basic_values.rb rename to test/vool/statements/test_basic_values.rb diff --git a/test/vool/test_class_statement.rb b/test/vool/statements/test_class_statement.rb similarity index 100% rename from test/vool/test_class_statement.rb rename to test/vool/statements/test_class_statement.rb diff --git a/test/vool/test_hash_statement.rb b/test/vool/statements/test_hash_statement.rb similarity index 100% rename from test/vool/test_hash_statement.rb rename to test/vool/statements/test_hash_statement.rb diff --git a/test/vool/test_if_statement.rb b/test/vool/statements/test_if_statement.rb similarity index 100% rename from test/vool/test_if_statement.rb rename to test/vool/statements/test_if_statement.rb diff --git a/test/vool/test_logical_statement.rb b/test/vool/statements/test_logical_statement.rb similarity index 100% rename from test/vool/test_logical_statement.rb rename to test/vool/statements/test_logical_statement.rb diff --git a/test/vool/test_method_statement.rb b/test/vool/statements/test_method_statement.rb similarity index 100% rename from test/vool/test_method_statement.rb rename to test/vool/statements/test_method_statement.rb diff --git a/test/vool/test_return_statement.rb b/test/vool/statements/test_return_statement.rb similarity index 100% rename from test/vool/test_return_statement.rb rename to test/vool/statements/test_return_statement.rb diff --git a/test/vool/test_send_statement.rb b/test/vool/statements/test_send_statement.rb similarity index 100% rename from test/vool/test_send_statement.rb rename to test/vool/statements/test_send_statement.rb diff --git a/test/vool/test_variables.rb b/test/vool/statements/test_variables.rb similarity index 100% rename from test/vool/test_variables.rb rename to test/vool/statements/test_variables.rb diff --git a/test/vool/test_while_statement.rb b/test/vool/statements/test_while_statement.rb similarity index 100% rename from test/vool/test_while_statement.rb rename to test/vool/statements/test_while_statement.rb diff --git a/test/vool/test_ruby_compiler.rb b/test/vool/test_ruby_compiler.rb index 2638b7b2..4669d63b 100644 --- a/test/vool/test_ruby_compiler.rb +++ b/test/vool/test_ruby_compiler.rb @@ -1,12 +1 @@ -require_relative "test_array_statement" -require_relative "test_assignment_statement" -require_relative "test_basic_values" -require_relative "test_class_statement" -require_relative "test_hash_statement" -require_relative "test_if_statement" -require_relative "test_logical_statement" -require_relative "test_method_statement" -require_relative "test_return_statement" -require_relative "test_send_statement" -require_relative "test_variables" -require_relative "test_while_statement" +require_relative "statements/test_all"