First try for AST structure. A lot of things to change
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / LabeledStatement.java
1 package net.sourceforge.phpdt.internal.compiler.ast;
2
3 /**
4  * @author Matthieu Casanova
5  */
6 public class LabeledStatement extends Statement {
7
8   public char[] label;
9
10   public Statement statement;
11
12   public LabeledStatement(char[] label, Statement statement, int sourceStart, int sourceEnd) {
13     super(sourceStart, sourceEnd);
14     this.label = label;
15     this.statement = statement;
16   }
17
18   /**
19    * Return the object into String.
20    * It should be overriden
21    * @return a String
22    */
23   public String toString() {
24     return new String(label) + statement.toString();
25   }
26
27   /**
28    * Return the object into String.
29    * @param tab how many tabs (not used here
30    * @return a String
31    */
32   public String toString(int tab) {
33     return tabString(tab) + toString();
34   }
35 }