/src/lib/parse/eiffel/eiffel_terminal_node_impl.e

http://github.com/tybor/Liberty · Specman e · 72 lines · 40 code · 9 blank · 23 comment · 0 complexity · 7b5d8be09699537b2c88131914743e00 MD5 · raw file

  1. -- This file is part of a Liberty Eiffel library.
  2. -- See the full copyright at the end.
  3. --
  4. class EIFFEL_TERMINAL_NODE_IMPL
  5. inherit
  6. EIFFEL_TERMINAL_NODE
  7. creation {EIFFEL_NODE_FACTORY}
  8. make
  9. feature {ANY}
  10. name: FIXED_STRING
  11. image: EIFFEL_IMAGE
  12. accept (visitor: VISITOR) is
  13. local
  14. v: EIFFEL_TERMINAL_NODE_IMPL_VISITOR
  15. do
  16. v ::= visitor
  17. v.visit_eiffel_terminal_node_impl(Current)
  18. end
  19. feature {EIFFEL_NODE_HANDLER}
  20. display (output: OUTPUT_STREAM; indent: INTEGER; p: STRING) is
  21. do
  22. do_indent(output, indent, p)
  23. output.put_character('"')
  24. output.put_string(name)
  25. output.put_string(once "%": ")
  26. output.put_line(image.image)
  27. end
  28. generate (o: OUTPUT_STREAM) is
  29. do
  30. o.put_string(image.blanks)
  31. o.put_string(image.image)
  32. generate_forgotten(o)
  33. end
  34. feature {}
  35. make (a_name: like name; a_image: like image) is
  36. do
  37. name := a_name
  38. image := a_image
  39. ensure
  40. name = a_name
  41. image = a_image
  42. end
  43. end -- class EIFFEL_TERMINAL_NODE_IMPL
  44. --
  45. -- Copyright (c) 2009 by all the people cited in the AUTHORS file.
  46. --
  47. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  48. -- of this software and associated documentation files (the "Software"), to deal
  49. -- in the Software without restriction, including without limitation the rights
  50. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  51. -- copies of the Software, and to permit persons to whom the Software is
  52. -- furnished to do so, subject to the following conditions:
  53. --
  54. -- The above copyright notice and this permission notice shall be included in
  55. -- all copies or substantial portions of the Software.
  56. --
  57. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  58. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  59. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  60. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  61. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  62. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  63. -- THE SOFTWARE.