/plugins/PHPParser/tags/PHPParser-1.2.4/src/net/sourceforge/phpdt/internal/compiler/ast/HTMLCode.java

# · Java · 86 lines · 33 code · 12 blank · 41 comment · 0 complexity · 3a3319c4a3e9fd430233bac6adafc6e5 MD5 · raw file

  1. package net.sourceforge.phpdt.internal.compiler.ast;
  2. import gatchan.phpparser.parser.PHPParser;
  3. import java.util.List;
  4. /**
  5. * It's html code. It will contains some html, javascript, css ...
  6. *
  7. * @author Matthieu Casanova
  8. */
  9. public final class HTMLCode extends Statement {
  10. /** The html Code. */
  11. private final String htmlCode;
  12. /**
  13. * @param sourceStart starting offset
  14. * @param sourceEnd ending offset
  15. * @param beginLine begin line
  16. * @param endLine ending line
  17. * @param beginColumn begin column
  18. * @param endColumn ending column
  19. */
  20. public HTMLCode(String htmlCode,
  21. int sourceStart,
  22. int sourceEnd,
  23. int beginLine,
  24. int endLine,
  25. int beginColumn,
  26. int endColumn) {
  27. super(sourceStart, sourceEnd, beginLine, endLine, beginColumn, endColumn);
  28. this.htmlCode = htmlCode;
  29. }
  30. /**
  31. * I don't process tabs, it will only return the html inside.
  32. *
  33. * @return the text of the block
  34. */
  35. public String toString() {
  36. return htmlCode;
  37. }
  38. /**
  39. * I don't process tabs, it will only return the html inside.
  40. *
  41. * @param tab how many tabs before this html
  42. *
  43. * @return the text of the block
  44. */
  45. public String toString(int tab) {
  46. return htmlCode + ' ';
  47. }
  48. /**
  49. * Get the variables from outside (parameters, globals ...)
  50. *
  51. * @param list the list where we will put variables
  52. */
  53. public void getOutsideVariable(List list) {
  54. }
  55. /**
  56. * get the modified variables.
  57. *
  58. * @param list the list where we will put variables
  59. */
  60. public void getModifiedVariable(List list) {
  61. }
  62. /**
  63. * Get the variables used.
  64. *
  65. * @param list the list where we will put variables
  66. */
  67. public void getUsedVariable(List list) {
  68. }
  69. public Expression expressionAt(int line, int column) {
  70. return null;
  71. }
  72. public void analyzeCode(PHPParser parser) {
  73. }
  74. }