From c3a28d2abcad3c5fe9e0779ea4062402907f89bf Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 8 Dec 2016 15:19:37 +0200 Subject: [PATCH] small collector change --- lib/salama.rb | 1 - test/melon/collector.rb | 10 ++++++---- test/melon/helper.rb | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/salama.rb b/lib/salama.rb index 90a48ef6..be9f0175 100644 --- a/lib/salama.rb +++ b/lib/salama.rb @@ -9,7 +9,6 @@ AST::Node.class_eval do end end -require 'parser/transform' require "salama-object-file" require "register" require "register/builtin/space" diff --git a/test/melon/collector.rb b/test/melon/collector.rb index b9eb5774..e8ee0226 100644 --- a/test/melon/collector.rb +++ b/test/melon/collector.rb @@ -11,7 +11,8 @@ class Walker < AST::Processor def on_send node _ , method , file_node = *node if method == :require - @collector.load file_node.children[0] + ".rb" + file = file_node.children[0] + @collector.load("#{file}.rb") unless file.include?("parslet") end if method == :require_relative @collector.load File.dirname(@collector.current) + "/" + file_node.children[0] + ".rb" @@ -68,7 +69,7 @@ class Collector def run load "salama.rb" load "parser/ruby22.rb" - load "../../../.rbenv/versions/2.2.3/lib/ruby/2.2.0/racc/parser.rb" +# load "../../../.rbenv/versions/2.2.3/lib/ruby/2.2.0/racc/parser.rb" print end @@ -84,10 +85,11 @@ class Collector def print @class_defs.uniq! @files.uniq! - puts "Class defs #{@class_defs.length}" puts "Types #{@types.to_yaml}" + puts "Class defs #{@class_defs.length}" + puts "Class defs #{@class_defs}" puts "evals=#{@evals.length} #{@evals.uniq}" - #puts "Not found #{@not_found.length} #{@not_found}" + puts "Not found #{@not_found.length} #{@not_found}" end end diff --git a/test/melon/helper.rb b/test/melon/helper.rb index a3648b9f..3d8461b4 100644 --- a/test/melon/helper.rb +++ b/test/melon/helper.rb @@ -10,6 +10,6 @@ module MelonTests def check assert true - puts @parser.parse @string_input + #puts @parser.parse @string_input end end