/src/tools/semantics/code/expressions/liberty_prefix_operator.e
Specman e | 66 lines | 43 code | 9 blank | 14 comment | 0 complexity | 656152963900ccce19829aa766698791 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_PREFIX_OPERATOR 16 17inherit 18 LIBERTY_PREFIX_CALL 19 rename 20 make as prefix_make 21 end 22 23create {LIBERTY_BUILDER_TOOLS} 24 make 25 26create {LIBERTY_PREFIX_OPERATOR} 27 new 28 29feature {} 30 make (a_target: like target; a_entity: like entity; a_position: like position) is 31 require 32 a_target /= Void 33 a_entity.feature_name.is_prefix 34 a_position /= Void 35 do 36 target := a_target 37 entity := a_entity 38 position := a_position 39 ensure 40 position = a_position 41 end 42 43 the_prefix_name: FIXED_STRING is 44 do 45 check False end 46 end 47 48 make_new (a_target: like target; a_entity: like entity; a_actuals: like actuals_list; a_position: like position): like Current is 49 do 50 create Result.new(a_target, a_entity, a_actuals, a_position) 51 end 52 53feature {ANY} 54 accept (v: VISITOR) is 55 local 56 v0: LIBERTY_PREFIX_OPERATOR_VISITOR 57 do 58 v0 ::= v 59 v0.visit_liberty_prefix_operator(Current) 60 end 61 62invariant 63 actuals.is_empty 64 not is_implicit_current 65 66end