PageRenderTime 15ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/tools/semantics/types/type_resolver/liberty_type_resolver_in_universe.e

http://github.com/tybor/Liberty
Specman e | 72 lines | 46 code | 12 blank | 14 comment | 1 complexity | 79923158462bd5cf903b761bee631986 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_TYPE_RESOLVER_IN_UNIVERSE
16
17inherit
18   LIBERTY_TYPE_RESOLVER
19
20insert
21   LIBERTY_ERROR_LEVELS
22      undefine out_in_tagged_out_memory
23      end
24
25creation {LIBERTY_UNIVERSE}
26   make
27
28feature {ANY}
29   out_in_tagged_out_memory is
30      do
31         tagged_out_memory.append(once "resolver in universe")
32      end
33
34   specialized_in (a_type: LIBERTY_ACTUAL_TYPE): like Current is
35      do
36         Result := Current
37      end
38
39feature {}
40   universe: LIBERTY_UNIVERSE
41
42   lookup_type (type_definition: LIBERTY_AST_TYPE_DEFINITION): LIBERTY_TYPE is
43      do
44         if not type_definition.is_anchor then
45            Result := universe.get_type_from_type_definition(type_definition, Void)
46         end
47      end
48
49   lookup_export_type (type_definition: LIBERTY_AST_TYPE_DEFINITION): LIBERTY_TYPE is
50      do
51         check Result = Void end
52      end
53
54   lookup_position (type_definition: LIBERTY_AST_TYPE_DEFINITION): LIBERTY_POSITION is
55      do
56         check Result = Void end
57      end
58
59   make (a_universe: like universe) is
60      require
61         a_universe /= Void
62      do
63         universe := a_universe
64      ensure
65         universe = a_universe
66      end
67
68invariant
69   parent = Void
70   universe /= Void
71
72end -- class LIBERTY_TYPE_RESOLVER_IN_UNIVERSE