X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/StringLiteral.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/StringLiteral.java index b8f3672..d268e64 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/StringLiteral.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/StringLiteral.java @@ -10,11 +10,15 @@ ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; +import java.util.List; + import test.Token; public class StringLiteral extends Literal { String source; + AbstractVariable[] variablesInside; + public StringLiteral(final Token token) { super(token.sourceStart,token.sourceEnd); source = token.image; @@ -39,6 +43,22 @@ public class StringLiteral extends Literal { * @param e sourceend * @deprecated */ + public StringLiteral(final String token, + final int s, + final int e, + final AbstractVariable[] variablesInside) { + super(s, e); + source = token; + this.variablesInside = variablesInside; + } + + /** + * Create a new StringLiteral + * @param token the token + * @param s sourcestart + * @param e sourceend + * @deprecated + */ public StringLiteral(final char[] token, final int s, final int e) { this(new String(token),s, e); } @@ -67,4 +87,12 @@ public class StringLiteral extends Literal { public int sourceStart() { return sourceStart; } + + public void getUsedVariable(final List list) { + if (variablesInside != null) { + for (int i = 0; i < variablesInside.length; i++) { + variablesInside[i].getUsedVariable(list); + } + } + } }