Title: [663] trunk/jparsetree/lib/jparsetree.rb: I see, JRuby 1.0 now went back to implementing interfaces with 'include'...
Revision
663
Author
murphee
Date
2007-07-04 19:48:05 -0400 (Wed, 04 Jul 2007)

Log Message

I see, JRuby 1.0 now went back to implementing interfaces with 'include'... well, now that's fixed. (Running the previous version with JRuby 1.0 will give a nice, useless error message).
Also: iVisited.CPath doesn't seem to work as an accessor anymore, so I'm falling back to iVisited.getCPath.

Modified Paths

Diff

Modified: trunk/jparsetree/lib/jparsetree.rb (662 => 663)


--- trunk/jparsetree/lib/jparsetree.rb	2007-07-02 13:02:28 UTC (rev 662)
+++ trunk/jparsetree/lib/jparsetree.rb	2007-07-04 23:48:05 UTC (rev 663)
@@ -3,44 +3,45 @@
 
 module JParseTree
 
-
 module SourceLocations
  def source_location
-   @location
+    @location
  end
  def source_location=(location)
-   @location = location
+         @location = location
  end
 end
 
 
 
-def JParseTree.filter_nested_arrays(bl)
-    if bl != nil
-      while bl.is_a? Array 
-        if bl.size == 1 
-         if bl.first.is_a? Array
-          bl = bl.first
-         else 
+class ParseTree
+
+
+
+  def JParseTree.filter_nested_arrays(bl)
+      if bl != nil
+            while bl.is_a? Array 
+            if bl.size == 1 
+             if bl.first.is_a? Array
+               bl = bl.first
+                else 
            break
-         end
-        else
-         break
-        end
-      end
-    end
-    bl
+            end
+            else
+             break
+            end
+          end
+       end
+     bl
   end
-  
 
-class ParseTree       
 
 
   # Compatibility for ParseTree which requires a boolean argument;
   def initialize(arg)
   end
 
-VERSION = '0.9.8.371'
+VERSION = '0.9.9.402'
 
   ##
   # Main driver for ParseTree. Returns an array of arrays containing
@@ -193,8 +194,8 @@
 
 include_class "org.jruby.ast.visitor.NodeVisitor"
 
-class ParseTreeVisitor < NodeVisitor
-
+class ParseTreeVisitor 
+  include NodeVisitor
   attr_accessor :sexpr
 
   def location(obj, node)
@@ -1068,7 +1069,7 @@
     visit(iVisited.body_node)
     body = @stackElements.pop
     #puts "[EMAIL PROTECTED]"
-    @stackElements << location([:module, iVisited.CPath.name.to_sym, 
+    @stackElements << location([:module, iVisited.getCPath.name.to_sym, 
                                   location([:scope, JParseTree.filter_nested_arrays(body)], iVisited.body_node) 
                                ], iVisited)
 
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to