/src/tools/syntax/tree/liberty_ast_terminal_node.e

http://github.com/tybor/Liberty · Specman e · 59 lines · 37 code · 8 blank · 14 comment · 0 complexity · ff46ee3340bac83ffbcc21dbde97cfb1 MD5 · raw file

  1. -- This file is part of Liberty Eiffel.
  2. --
  3. -- Liberty Eiffel is free software: you can redistribute it and/or modify
  4. -- it under the terms of the GNU General Public License as published by
  5. -- the Free Software Foundation, version 3 of the License.
  6. --
  7. -- Liberty Eiffel is distributed in the hope that it will be useful,
  8. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. -- GNU General Public License for more details.
  11. --
  12. -- You should have received a copy of the GNU General Public License
  13. -- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>.
  14. --
  15. deferred class LIBERTY_AST_TERMINAL_NODE
  16. inherit
  17. EIFFEL_TERMINAL_NODE
  18. feature {ANY}
  19. name: FIXED_STRING
  20. image: EIFFEL_IMAGE
  21. accept (v: VISITOR) is
  22. do
  23. check False end
  24. end
  25. feature {EIFFEL_NODE_HANDLER}
  26. display (output: OUTPUT_STREAM; indent: INTEGER; p: STRING) is
  27. do
  28. do_indent(output, indent, p)
  29. output.put_character('"')
  30. output.put_string(name)
  31. output.put_string(once "%": ")
  32. output.put_line(image.image)
  33. end
  34. generate (o: OUTPUT_STREAM) is
  35. do
  36. o.put_string(image.blanks)
  37. o.put_string(image.image)
  38. generate_forgotten(o)
  39. end
  40. feature {}
  41. make (a_name: ABSTRACT_STRING; a_image: like image) is
  42. require
  43. a_name.has_prefix(once "KW ")
  44. do
  45. name := a_name.intern
  46. image := a_image
  47. ensure
  48. name = a_name
  49. image = a_image
  50. end
  51. end