/[eiffelstudio]/branches/CAT_mono/Src/framework/parser/AST/types/type_as.e
ViewVC logotype

Contents of /branches/CAT_mono/Src/framework/parser/AST/types/type_as.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 69687 - (show annotations)
Wed Jul 25 18:55:08 2007 UTC (12 years, 4 months ago) by martins
File size: 3385 byte(s)
* monomorph for formals
* covaraince for generics (syntax only)
1 indexing
2
3 description: "Abstract class for Eiffel types. Version for Bench."
4 legal: "See notice at end of class."
5 status: "See notice at end of class.";
6 date: "$Date$";
7 revision: "$Revision$"
8
9 deferred class TYPE_AS
10
11 inherit
12 AST_EIFFEL
13
14 REFACTORING_HELPER
15 export
16 {NONE} all
17 undefine
18 is_equal, out
19 end
20
21 feature -- Roundtrip
22
23 lcurly_symbol, rcurly_symbol: SYMBOL_AS
24 -- Left and/or right curly symbol(s) associated with this structure
25 -- Maybe none of them, or maybe only left curly appears.
26
27 set_lcurly_symbol (s_as: SYMBOL_AS) is
28 -- Set `lcurly_symbol' with `s_as'.
29 do
30 lcurly_symbol := s_as
31 ensure
32 lcurly_symbol_set: lcurly_symbol = s_as
33 end
34
35 set_rcurly_symbol (s_as: SYMBOL_AS) is
36 -- Set `rcurly_symbol' with `s_as'.
37 do
38 rcurly_symbol := s_as
39 ensure
40 rcurly_symbol_set: rcurly_symbol = s_as
41 end
42
43 feature -- Roundtrip/Token
44
45 first_token (a_list: LEAF_AS_LIST): LEAF_AS is
46 do
47 if a_list /= Void and then lcurly_symbol /= Void then
48 Result := lcurly_symbol.first_token (a_list)
49 end
50 end
51
52 last_token (a_list: LEAF_AS_LIST): LEAF_AS is
53 do
54 if a_list /= Void and then rcurly_symbol /= Void then
55 Result := rcurly_symbol.last_token (a_list)
56 end
57 end
58
59 feature -- Status
60
61 has_covariant_keyword: BOOLEAN
62 -- Is the type marked with a covariant keyword?
63 do
64 Result := covariant_keyword /= Void
65 fixme ("Move covariant_keyword into wrapper class which encapsulates the keyword and a TYPE_AS. Adapt type list for generic derivation to use the new wrapper.")
66 end
67
68 feature -- Access
69
70 covariant_keyword: KEYWORD_AS
71 -- Keyword which marks type as covariant
72 --| Void if type is not part of generic derivation.
73
74 feature -- Element change
75
76 set_covariant_keyword (a_keyword: KEYWORD_AS)
77 -- Set `covariant_keyword' to `a_keyword'
78 require
79 a_keyword_not_void: a_keyword /= Void
80 do
81 covariant_keyword := a_keyword
82 ensure
83 keyword_set: covariant_keyword = a_keyword
84 end
85
86 feature -- Output
87
88 dump: STRING is
89 -- Dumped trace
90 deferred
91 end
92
93 indexing
94 copyright: "Copyright (c) 1984-2006, Eiffel Software"
95 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
96 licensing_options: "http://www.eiffel.com/licensing"
97 copying: "[
98 This file is part of Eiffel Software's Eiffel Development Environment.
99
100 Eiffel Software's Eiffel Development Environment is free
101 software; you can redistribute it and/or modify it under
102 the terms of the GNU General Public License as published
103 by the Free Software Foundation, version 2 of the License
104 (available at the URL listed under "license" above).
105
106 Eiffel Software's Eiffel Development Environment is
107 distributed in the hope that it will be useful, but
108 WITHOUT ANY WARRANTY; without even the implied warranty
109 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
110 See the GNU General Public License for more details.
111
112 You should have received a copy of the GNU General Public
113 License along with Eiffel Software's Eiffel Development
114 Environment; if not, write to the Free Software Foundation,
115 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
116 ]"
117 source: "[
118 Eiffel Software
119 356 Storke Road, Goleta, CA 93117 USA
120 Telephone 805-685-1006, Fax 805-685-6869
121 Website http://www.eiffel.com
122 Customer support http://support.eiffel.com
123 ]"
124
125 end -- class TYPE_AS

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23