First try for AST structure. A lot of things to change
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / PHPEchoBlock.java
1 package net.sourceforge.phpdt.internal.compiler.ast;
2
3 /**
4  * @author Matthieu Casanova
5  */
6 public class PHPEchoBlock extends AstNode {
7
8   public Expression expr;
9
10   public PHPEchoBlock(Expression expr,int sourceStart, int sourceEnd) {
11     super(sourceStart, sourceEnd);
12     this.expr = expr;
13   }
14
15   /**
16    * Return the object into String.
17    * @param tab how many tabs (not used here
18    * @return a String
19    */
20   public String toString(int tab) {
21     final StringBuffer buff = new StringBuffer(tabString(tab));
22     buff.append("<?=");
23     buff.append(expr.toStringExpression());
24     buff.append("?>");
25     return buff.toString();
26   }
27 }