/src/tools/statue/liberty_enlightening_the_world.e

http://github.com/tybor/Liberty · Specman e · 50 lines · 27 code · 6 blank · 17 comment · 0 complexity · c715badb4e8758ca5cc49a46406e3fdc 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. expanded class LIBERTY_ENLIGHTENING_THE_WORLD
  16. --
  17. -- Allows to ensure that the compiler is still progressing. Useful to avoid staying stuck in an infinite loop.
  18. --
  19. insert
  20. LOGGING
  21. feature {ANY}
  22. burn is
  23. do
  24. torch.increment
  25. debug
  26. log.trace.put_string(once "FLAME: ")
  27. log.trace.put_integer(torch.value)
  28. log.trace.put_new_line
  29. end
  30. end
  31. flame: LIBERTY_FLAME is
  32. do
  33. Result.set(torch.value)
  34. end
  35. still_burns (a_flame: like flame): BOOLEAN is
  36. do
  37. Result := torch.value > a_flame.light
  38. end
  39. feature {}
  40. torch: COUNTER is
  41. once
  42. create Result
  43. end
  44. end -- class LIBERTY_ENLIGHTENING_THE_WORLD