}
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) {
init();
try {
parse();
- phpDocument = new PHPDocument(null);
phpDocument.nodes = new AstNode[nodes.length];
System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length);
+ PHPeclipsePlugin.log(1,phpDocument.toString());
} catch (ParseException e) {
processParseException(e);
}
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 {
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;
{if (true) return token.image.substring(1);}
}
buff = new StringBuffer(token.image);
- buff.append('{');
+ buff.append("{");
buff.append(expression.toStringExpression());
- buff.append('}');
+ buff.append("}");
{if (true) return buff.toString();}
break;
case DOLLAR:
jj_consume_token(DOLLAR);
expr = VariableName();
- {if (true) return expr;}
+ {if (true) return "$" + expr;}
break;
default:
jj_la1[12] = jj_gen;
{if (true) return token.image;}
}
buff = new StringBuffer(token.image);
- buff.append('{');
+ buff.append("{");
buff.append(expression.toStringExpression());
- buff.append('}');
+ buff.append("}");
{if (true) return buff.toString();}
break;
case DOLLAR:
jj_consume_token(DOLLAR);
expr = VariableName();
- buff = new StringBuffer('$');
+ buff = new StringBuffer("$");
buff.append(expr);
{if (true) return buff.toString();}
break;