1 package net.sourceforge.phpdt.internal.compiler.ast;
7 * <?= someexpression ?>
8 * @author Matthieu Casanova
10 public final class PHPEchoBlock extends AstNode {
12 /** the expression. */
13 private final Expression expr;
16 * Create a new php echo block.
17 * @param expr the expression
18 * @param sourceStart the starting offset
19 * @param sourceEnd the ending offset
21 public PHPEchoBlock(final Expression expr,
22 final int sourceStart,
23 final int sourceEnd) {
24 super(sourceStart, sourceEnd);
29 * Return the object into String.
30 * @param tab how many tabs (not used here
33 public String toString(final int tab) {
34 final String tabs = tabString(tab);
35 final String expression = expr.toStringExpression();
36 final StringBuffer buff = new StringBuffer(tabs.length() +
40 buff.append("<?=");//$NON-NLS-1$
41 buff.append(expression);
42 buff.append("?>");//$NON-NLS-1$
43 return buff.toString();
47 * Get the variables from outside (parameters, globals ...)
49 * @param list the list where we will put variables
51 public void getOutsideVariable(final List list) {}
54 * get the modified variables.
56 * @param list the list where we will put variables
58 public void getModifiedVariable(final List list) {}
61 * Get the variables used.
63 * @param list the list where we will put variables
65 public void getUsedVariable(final List list) {
66 expr.getUsedVariable(list);