2d40de1d7c24d3f016041b021cfae12952f213e6
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / HTMLBlock.java
1 package net.sourceforge.phpdt.internal.compiler.ast;
2
3 import java.util.List;
4 import java.util.ArrayList;
5
6 /**
7  * @author Matthieu Casanova
8  */
9 public class HTMLBlock extends Statement {
10
11   public AstNode[] nodes;
12
13   public HTMLBlock(final AstNode[] nodes) {
14     super(nodes[0].sourceStart, nodes[(nodes.length > 0) ? nodes.length - 1 : 0].sourceEnd);
15     this.nodes = nodes;
16   }
17
18   /**
19    * Return the object into String.
20    * @param tab how many tabs (not used here
21    * @return a String
22    */
23   public String toString(final int tab) {
24     final StringBuffer buff = new StringBuffer(tabString(tab));
25     buff.append("?>");
26     for (int i = 0; i < nodes.length; i++) {
27       buff.append(nodes[i].toString(tab + 1));
28     }
29     buff.append("<?php\n");
30     return buff.toString();
31   }
32
33   /**
34    * Get the variables from outside (parameters, globals ...)
35    */
36   public void getOutsideVariable(final List list) {
37   }
38
39   /**
40    * get the modified variables.
41    */
42   public void getModifiedVariable(final List list) {
43   }
44
45   /**
46    * Get the variables used.
47    */
48   public void getUsedVariable(final List list) {
49   }
50 }