PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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