First try for AST structure. A lot of things to change
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / HTMLCode.java
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/HTMLCode.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/HTMLCode.java
new file mode 100644 (file)
index 0000000..e52d981
--- /dev/null
@@ -0,0 +1,41 @@
+package net.sourceforge.phpdt.internal.compiler.ast;
+
+
+/**
+ * It's html code.
+ * It will contains some html, javascript, css ...
+ * @author Matthieu Casanova
+ */
+public class HTMLCode extends AstNode {
+
+  /** The html Code. */
+  public char[] htmlCode;
+
+  /**
+   * Create an html Block.
+   * @param htmlCode the html inside the block
+   * @param sourceStart the starting offset
+   * @param sourceEnd the ending offset
+   */
+  public HTMLCode(char[] htmlCode, int sourceStart, int sourceEnd) {
+    super(sourceStart, sourceEnd);
+    this.htmlCode = htmlCode;
+  }
+
+  /**
+   * I don't process tabs, it will only return the html inside.
+   * @return the text of the block
+   */
+  public String toString() {
+    return new String(htmlCode);
+  }
+
+  /**
+   * I don't process tabs, it will only return the html inside.
+   * @param tab how many tabs before this html
+   * @return the text of the block
+   */
+  public String toString(int tab) {
+    return new String(htmlCode);
+  }
+}