|
From: <caw...@us...> - 2007-03-05 15:25:16
|
Revision: 2088
http://svn.sourceforge.net/rubyeclipse/?rev=2088&view=rev
Author: cawilliams
Date: 2007-03-05 07:25:15 -0800 (Mon, 05 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyParser.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyParser.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyParser.java 2007-03-05 14:44:11 UTC (rev 2087)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyParser.java 2007-03-05 15:25:15 UTC (rev 2088)
@@ -16,9 +16,11 @@
import java.io.Reader;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;
+import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
+import org.jruby.ast.CommentNode;
import org.jruby.ast.Node;
import org.jruby.common.NullWarnings;
import org.jruby.lexer.yacc.LexerSource;
@@ -38,6 +40,7 @@
private final RubyParserPool pool;
private IRdtWarnings warnings;
private static boolean isDebug;
+ private RubyParserResult result;
public RubyParser() {
this(new NullRdtWarnings());
@@ -50,7 +53,7 @@
public Node parse(IFile file, Reader content) {
DefaultRubyParser parser = null;
- RubyParserResult result = null;
+ result = null;
try {
warnings.setFile(file);
parser = getDefaultRubyParser();
@@ -66,6 +69,10 @@
}
return result.getAST();
}
+
+ public List<CommentNode> getComments() {
+ return result.getCommentNodes();
+ }
protected void returnBorrowedParser(DefaultRubyParser parser) {
pool.returnParser(parser);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|