/src/tools/semantics/code/features/liberty_feature_do.e
Specman e | 82 lines | 55 code | 13 blank | 14 comment | 1 complexity | b89967c143cf26bef40c22174efdf8de 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_FEATURE_DO 16 17inherit 18 LIBERTY_FEATURE_ROUTINE 19 20create {LIBERTY_BUILDER_TOOLS} 21 make 22 23feature {ANY} 24 accept (v: VISITOR) is 25 local 26 v0: LIBERTY_FEATURE_DO_VISITOR 27 do 28 v0 ::= v 29 v0.visit_liberty_feature_do(Current) 30 end 31 32feature {} 33 do_join (a_type: LIBERTY_ACTUAL_TYPE; a_feature: LIBERTY_FEATURE; current_fd, other_fd: LIBERTY_FEATURE_DEFINITION): LIBERTY_FEATURE is 34 do 35 Result := a_feature.joined_do(a_type, Current, other_fd, current_fd) 36 end 37 38feature {LIBERTY_FEATURE} 39 joined_attribute (a_type: LIBERTY_ACTUAL_TYPE; a_feature: LIBERTY_FEATURE_ATTRIBUTE; current_fd, other_fd: LIBERTY_FEATURE_DEFINITION): LIBERTY_FEATURE is 40 do 41 current_fd.fatal_join_error_concrete_concrete(a_type, other_fd) 42 end 43 44 joined_constant (a_type: LIBERTY_ACTUAL_TYPE; a_feature: LIBERTY_FEATURE_CONSTANT; current_fd, other_fd: LIBERTY_FEATURE_DEFINITION): LIBERTY_FEATURE is 45 do 46 current_fd.fatal_join_error_concrete_concrete(a_type, other_fd) 47 end 48 49 joined_deferred (a_type: LIBERTY_ACTUAL_TYPE; a_feature: LIBERTY_FEATURE_DEFERRED; current_fd, other_fd: LIBERTY_FEATURE_DEFINITION): LIBERTY_FEATURE is 50 do 51 Result := Current 52 end 53 54 joined_do (a_type: LIBERTY_ACTUAL_TYPE; a_feature: LIBERTY_FEATURE_DO; current_fd, other_fd: LIBERTY_FEATURE_DEFINITION): LIBERTY_FEATURE is 55 do 56 current_fd.fatal_join_error_concrete_concrete(a_type, other_fd) 57 end 58 59 joined_external (a_type: LIBERTY_ACTUAL_TYPE; a_feature: LIBERTY_FEATURE_EXTERNAL; current_fd, other_fd: LIBERTY_FEATURE_DEFINITION): LIBERTY_FEATURE is 60 do 61 current_fd.fatal_join_error_concrete_concrete(a_type, other_fd) 62 end 63 64 joined_once (a_type: LIBERTY_ACTUAL_TYPE; a_feature: LIBERTY_FEATURE_ONCE; current_fd, other_fd: LIBERTY_FEATURE_DEFINITION): LIBERTY_FEATURE is 65 do 66 current_fd.fatal_join_error_concrete_concrete(a_type, other_fd) 67 end 68 69 joined_redefined (a_type: LIBERTY_ACTUAL_TYPE; a_feature: LIBERTY_FEATURE_REDEFINED; current_fd, other_fd: LIBERTY_FEATURE_DEFINITION): LIBERTY_FEATURE is 70 do 71 if a_feature.definition_type = definition_type then 72 current_fd.fatal_join_error_concrete_redefined(a_type, other_fd) 73 end 74 Result := Current 75 end 76 77 joined_unique (a_type: LIBERTY_ACTUAL_TYPE; a_feature: LIBERTY_FEATURE_UNIQUE; current_fd, other_fd: LIBERTY_FEATURE_DEFINITION): LIBERTY_FEATURE is 78 do 79 current_fd.fatal_join_error_concrete_concrete(a_type, other_fd) 80 end 81 82end