X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/test/PHPParser.java b/net.sourceforge.phpeclipse/src/test/PHPParser.java index a25a5b4..4440696 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParser.java +++ b/net.sourceforge.phpeclipse/src/test/PHPParser.java @@ -101,7 +101,8 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon } public final PHPOutlineInfo parseInfo(final Object parent, final String s) { - currentSegment = new PHPDocument(parent); + phpDocument = new PHPDocument(parent,"_root".toCharArray()); + currentSegment = phpDocument; outlineInfo = new PHPOutlineInfo(parent, currentSegment); final StringReader stream = new StringReader(s); if (jj_input_stream == null) { @@ -111,9 +112,9 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon init(); try { parse(); - phpDocument = new PHPDocument(null); phpDocument.nodes = new AstNode[nodes.length]; System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length); + phpDocument.toString(); } catch (ParseException e) { processParseException(e); } @@ -629,11 +630,9 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon case FUNCTION: method = MethodDeclaration(); method.setParent(classDeclaration); - classDeclaration.addMethod(method); break; case VAR: field = FieldDeclaration(); - classDeclaration.addVariable(field); break; default: jj_la1[8] = jj_gen;