PageRenderTime 10ms CodeModel.GetById 8ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/src/tools/semantics/code/expressions/liberty_void.e

http://github.com/tybor/Liberty
Specman e | 74 lines | 49 code | 10 blank | 15 comment | 0 complexity | c439fe0d4daf70cf60cb616da7654eea 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--
15class LIBERTY_VOID
16
17inherit
18   LIBERTY_EXPRESSION
19
20create {LIBERTY_BUILDER_TOOLS}
21   make
22
23feature {ANY}
24   result_type: LIBERTY_TYPE
25
26   specialized_in (a_type: LIBERTY_ACTUAL_TYPE): like Current is
27      do
28         Result := Current
29      end
30
31feature {LIBERTY_REACHABLE, LIBERTY_REACHABLE_COLLECTION_MARKER}
32   mark_reachable_code (mark: INTEGER) is
33      do
34         -- nothing
35      end
36
37feature {LIBERTY_BUILDER_TOOLS}
38   set_result_type (a_result_type: like result_type) is
39      require
40         a_result_type /= Void
41         result_type = void_type
42      do
43         result_type := a_result_type
44      ensure
45         result_type = a_result_type
46      end
47
48   void_type: LIBERTY_VOID_TYPE is
49      once
50         create Result.make
51      end
52
53feature {}
54   make (a_position: like position) is
55      require
56         a_position /= Void
57      do
58         position := a_position
59         result_type := void_type
60      ensure
61         position = a_position
62         result_type = void_type
63      end
64
65feature {ANY}
66   accept (v: VISITOR) is
67      local
68         v0: LIBERTY_VOID_VISITOR
69      do
70         v0 ::= v
71         v0.visit_liberty_void(Current)
72      end
73
74end