X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/test/PHPParser.jj b/net.sourceforge.phpeclipse/src/test/PHPParser.jj index 34f35cc..e9930a3 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParser.jj +++ b/net.sourceforge.phpeclipse/src/test/PHPParser.jj @@ -122,7 +122,8 @@ public final class PHPParser extends PHPParserSuperclass { } 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) { @@ -132,9 +133,9 @@ public final class PHPParser extends PHPParserSuperclass { 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); } @@ -166,8 +167,8 @@ public final class PHPParser extends PHPParserSuperclass { if (errorStart == -1) { setMarker(fileToParse, errorMessage, - jj_input_stream.tokenBegin, - jj_input_stream.tokenBegin + e.currentToken.image.length(), + SimpleCharStream.tokenBegin, + SimpleCharStream.tokenBegin + e.currentToken.image.length(), errorLevel, "Line " + e.currentToken.beginLine); } else { @@ -766,9 +767,8 @@ void ClassBodyDeclaration(ClassDeclaration classDeclaration) : FieldDeclaration field; } { - method = MethodDeclaration() {method.setParent(classDeclaration); - classDeclaration.addMethod(method);} -| field = FieldDeclaration() {classDeclaration.addVariable(field);} + method = MethodDeclaration() {method.setParent(classDeclaration);} +| field = FieldDeclaration() } /** @@ -896,7 +896,7 @@ String Variable(): } | expr = VariableName() - {return expr;} + {return "$" + expr;} } String VariableName():