/src/tools/errors/liberty_syntax_position.e

http://github.com/tybor/Liberty · Specman e · 47 lines · 26 code · 7 blank · 14 comment · 0 complexity · 6fbd35d17f497ef5ac199464dd080bff 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_SYNTAX_POSITION
  16. inherit
  17. LIBERTY_POSITION
  18. create {LIBERTY_ERRORS}
  19. make
  20. feature {ANY}
  21. source: STRING
  22. feature {ANY}
  23. is_unknown: BOOLEAN is False
  24. feature {}
  25. make (a_index: like index; a_source: like source; a_file: like file) is
  26. require
  27. a_source /= Void
  28. a_index.in_range(a_source.lower, a_source.upper)
  29. do
  30. index := a_index
  31. source := a_source
  32. file := a_file
  33. ensure
  34. index = a_index
  35. source = a_source
  36. file = a_file
  37. end
  38. invariant
  39. source /= Void
  40. end