From f476951c21ad0e924129616117065d7c2204e7f5 Mon Sep 17 00:00:00 2001 From: kpouer Date: Sun, 10 Aug 2003 15:45:41 +0000 Subject: [PATCH 1/1] this class will define a class instantiation (with maybe a &) --- .../internal/compiler/ast/ClassInstantiation.java | 24 ++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) create mode 100644 net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassInstantiation.java diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassInstantiation.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassInstantiation.java new file mode 100644 index 0000000..aec08c9 --- /dev/null +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassInstantiation.java @@ -0,0 +1,24 @@ +package net.sourceforge.phpdt.internal.compiler.ast; + +/** + * a class instantiation. + * @author Matthieu Casanova + */ +public class ClassInstantiation extends PrefixedUnaryExpression { + + private boolean reference; + + public ClassInstantiation(final Expression expression, + final boolean reference, + final int sourceStart) { + super(expression, OperatorIds.NEW, sourceStart); + this.reference = reference; + } + + public String toStringExpression() { + if (!reference) { + return super.toStringExpression(); + } + return "&"+super.toStringExpression(); + } +} -- 1.7.1