|
From: <caw...@us...> - 2007-02-08 15:53:21
|
Revision: 1941
http://svn.sourceforge.net/rubyeclipse/?rev=1941&view=rev
Author: cawilliams
Date: 2007-02-08 07:37:16 -0800 (Thu, 08 Feb 2007)
Log Message:
-----------
handle spitting out representations of LocalVarNode (this shows up in outline when arg defaults a previous arg's value). This should actually handle any INameNode implementors.
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/ASTUtil.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/ASTUtil.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/ASTUtil.java 2007-02-08 14:54:15 UTC (rev 1940)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/ASTUtil.java 2007-02-08 15:37:16 UTC (rev 1941)
@@ -13,12 +13,14 @@
import org.jruby.ast.HashNode;
import org.jruby.ast.ListNode;
import org.jruby.ast.LocalAsgnNode;
+import org.jruby.ast.LocalVarNode;
import org.jruby.ast.NilNode;
import org.jruby.ast.Node;
import org.jruby.ast.SelfNode;
import org.jruby.ast.StrNode;
import org.jruby.ast.TrueNode;
import org.jruby.ast.ZArrayNode;
+import org.jruby.ast.types.INameNode;
import org.jruby.parser.StaticScope;
public abstract class ASTUtil {
@@ -100,8 +102,8 @@
return "true";
if (node instanceof FalseNode)
return "false";
- if (node instanceof ConstNode)
- return ((ConstNode)node).getName();
+ if (node instanceof INameNode)
+ return ((INameNode)node).getName();
if (node instanceof ZArrayNode)
return "[]";
if (node instanceof FixnumNode)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|