/src/tools/semantics/code/expressions/liberty_array_manifest_constants.e

http://github.com/tybor/Liberty · 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. --
  15. class LIBERTY_ARRAY_MANIFEST_CONSTANTS
  16. feature {}
  17. manifest_put_feature_name: LIBERTY_FEATURE_NAME is
  18. once
  19. create Result.make("manifest_put".intern)
  20. end
  21. manifest_make_feature_name: LIBERTY_FEATURE_NAME is
  22. once
  23. create Result.make("manifest_make".intern)
  24. end
  25. manifest_creation_feature_name: LIBERTY_FEATURE_NAME is
  26. once
  27. create Result.make("manifest_creation".intern)
  28. end
  29. feature {}
  30. expression_separator (exp: LIBERTY_AST_EXPRESSION): LIBERTY_ARRAY_MANIFEST_SEPARATOR is
  31. do
  32. if exp.forgotten /= Void and then not exp.forgotten.is_empty then
  33. inspect
  34. exp.forgotten.first.name
  35. when "KW ," then
  36. Result := separator_comma
  37. when "KW ;" then
  38. Result := separator_semi_colon
  39. else
  40. check Result = separator_none end
  41. end
  42. else
  43. check Result = separator_none end
  44. end
  45. end
  46. feature {}
  47. separator_comma: LIBERTY_ARRAY_MANIFEST_SEPARATOR is
  48. once
  49. Result.set(1)
  50. end
  51. separator_semi_colon: LIBERTY_ARRAY_MANIFEST_SEPARATOR is
  52. once
  53. Result.set(2)
  54. end
  55. separator_none: LIBERTY_ARRAY_MANIFEST_SEPARATOR is
  56. once
  57. Result.set(0)
  58. end
  59. end -- class LIBERTY_ARRAY_MANIFEST_CONSTANTS