/src/tools/semantics/code/expressions/liberty_array_manifest_constants.e
Specman e | 67 lines | 45 code | 8 blank | 14 comment | 1 complexity | 8019112e1a6046413fa577a8ba5b1eb1 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_ARRAY_MANIFEST_CONSTANTS 16 17feature {} 18 manifest_put_feature_name: LIBERTY_FEATURE_NAME is 19 once 20 create Result.make("manifest_put".intern) 21 end 22 23 manifest_make_feature_name: LIBERTY_FEATURE_NAME is 24 once 25 create Result.make("manifest_make".intern) 26 end 27 28 manifest_creation_feature_name: LIBERTY_FEATURE_NAME is 29 once 30 create Result.make("manifest_creation".intern) 31 end 32 33feature {} 34 expression_separator (exp: LIBERTY_AST_EXPRESSION): LIBERTY_ARRAY_MANIFEST_SEPARATOR is 35 do 36 if exp.forgotten /= Void and then not exp.forgotten.is_empty then 37 inspect 38 exp.forgotten.first.name 39 when "KW ," then 40 Result := separator_comma 41 when "KW ;" then 42 Result := separator_semi_colon 43 else 44 check Result = separator_none end 45 end 46 else 47 check Result = separator_none end 48 end 49 end 50 51feature {} 52 separator_comma: LIBERTY_ARRAY_MANIFEST_SEPARATOR is 53 once 54 Result.set(1) 55 end 56 57 separator_semi_colon: LIBERTY_ARRAY_MANIFEST_SEPARATOR is 58 once 59 Result.set(2) 60 end 61 62 separator_none: LIBERTY_ARRAY_MANIFEST_SEPARATOR is 63 once 64 Result.set(0) 65 end 66 67end -- class LIBERTY_ARRAY_MANIFEST_CONSTANTS