1 package net.sourceforge.phpdt.internal.compiler.ast;
3 import net.sourceforge.phpdt.internal.compiler.ast.declarations.VariableUsage;
6 import java.util.ArrayList;
10 * <?= someexpression ?>
11 * @author Matthieu Casanova
13 public class PHPEchoBlock extends AstNode {
15 /** the expression. */
16 public Expression expr;
19 * Create a new php echo block.
20 * @param expr the expression
21 * @param sourceStart the starting offset
22 * @param sourceEnd the ending offset
24 public PHPEchoBlock(final Expression expr,
25 final int sourceStart,
26 final int sourceEnd) {
27 super(sourceStart, sourceEnd);
32 * Return the object into String.
33 * @param tab how many tabs (not used here
36 public String toString(final int tab) {
37 final String tabs = tabString(tab);
38 final String expression = expr.toStringExpression();
39 final StringBuffer buff = new StringBuffer(tabs.length() +
43 buff.append("<?=");//$NON-NLS-1$
44 buff.append(expression);
45 buff.append("?>");//$NON-NLS-1$
46 return buff.toString();
50 * Get the variables from outside (parameters, globals ...)
51 * @return an empty list
53 public List getOutsideVariable() {
54 return new ArrayList();
58 * get the modified variables.
59 * @return an empty list
61 public List getModifiedVariable() {
62 return new ArrayList();
66 * Get the variables used.
67 * @return the used variables are the used variables from the expression
69 public List getUsedVariable() {
70 return expr.getUsedVariable();