From b0934fe62a884119c2fb5a4db475a9671a298ff4 Mon Sep 17 00:00:00 2001 From: kpouer Date: Sun, 8 Jun 2003 14:16:13 +0000 Subject: [PATCH] *** empty log message *** --- .../internal/compiler/ast/ArrayInitializer.java | 7 +++---- .../internal/compiler/ast/VarAssignation.java | 4 ++-- net.sourceforge.phpeclipse/src/test/PHPParser.java | 12 ++++++------ net.sourceforge.phpeclipse/src/test/PHPParser.jj | 12 ++++++------ 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayInitializer.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayInitializer.java index 3d9cb87..0979b23 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayInitializer.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArrayInitializer.java @@ -22,13 +22,12 @@ public class ArrayInitializer extends Expression { final StringBuffer buff = new StringBuffer("array("); for (int i = 0; i < vars.length; i++) { ArrayVariableDeclaration var = vars[i]; - if (var != null) { - buff.append(var.toStringExpression()); - } if (i != 0) { - buff.append(','); + buff.append(","); } + buff.append(var.toStringExpression()); } + buff.append(")"); return buff.toString(); } } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VarAssignation.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VarAssignation.java index cd32d4b..dc08043 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VarAssignation.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VarAssignation.java @@ -74,9 +74,9 @@ public class VarAssignation extends Expression { public String toStringExpression() { final StringBuffer buff = new StringBuffer(); buff.append(variable); - buff.append(' '); + buff.append(" "); buff.append(operatorToString()); - buff.append(' '); + buff.append(" "); buff.append(expression.toStringExpression()); return buff.toString(); } diff --git a/net.sourceforge.phpeclipse/src/test/PHPParser.java b/net.sourceforge.phpeclipse/src/test/PHPParser.java index 4440696..d83a9ce 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParser.java +++ b/net.sourceforge.phpeclipse/src/test/PHPParser.java @@ -114,7 +114,7 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon parse(); phpDocument.nodes = new AstNode[nodes.length]; System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length); - phpDocument.toString(); + PHPeclipsePlugin.log(1,phpDocument.toString()); } catch (ParseException e) { processParseException(e); } @@ -782,9 +782,9 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon {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: @@ -831,15 +831,15 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon {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; diff --git a/net.sourceforge.phpeclipse/src/test/PHPParser.jj b/net.sourceforge.phpeclipse/src/test/PHPParser.jj index e9930a3..915c49c 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParser.jj +++ b/net.sourceforge.phpeclipse/src/test/PHPParser.jj @@ -135,7 +135,7 @@ public final class PHPParser extends PHPParserSuperclass { parse(); phpDocument.nodes = new AstNode[nodes.length]; System.arraycopy(nodes,0,phpDocument.nodes,0,nodes.length); - phpDocument.toString(); + PHPeclipsePlugin.log(1,phpDocument.toString()); } catch (ParseException e) { processParseException(e); } @@ -889,9 +889,9 @@ String Variable(): return token.image.substring(1); } buff = new StringBuffer(token.image); - buff.append('{'); + buff.append("{"); buff.append(expression.toStringExpression()); - buff.append('}'); + buff.append("}"); return buff.toString(); } | @@ -919,15 +919,15 @@ String VariableName(): return token.image; } buff = new StringBuffer(token.image); - buff.append('{'); + buff.append("{"); buff.append(expression.toStringExpression()); - buff.append('}'); + buff.append("}"); return buff.toString(); } | expr = VariableName() { - buff = new StringBuffer('$'); + buff = new StringBuffer("$"); buff.append(expr); return buff.toString(); } -- 1.7.1