import test.Token;
+import java.util.List;
+
public class StringLiteral extends Literal {
String source;
- public StringLiteral(Token token) {
+ AbstractVariable[] variablesInside;
+
+ public StringLiteral(final Token token) {
super(token.sourceStart,token.sourceEnd);
source = token.image;
}
* @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);
}
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);
+ }
+ }
+ }
}