A fork of Crisp for HARP
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

24 行
379 B

  1. module Crisp
  2. extend self
  3. class ParseException < Exception
  4. end
  5. class EvalException < Exception
  6. end
  7. class RuntimeException < Exception
  8. getter :thrown
  9. def initialize(@thrown : Crisp::Expr)
  10. super()
  11. end
  12. end
  13. def eval_error(msg)
  14. raise Crisp::EvalException.new msg
  15. end
  16. def parse_error(msg)
  17. raise Crisp::ParseException.new msg
  18. end
  19. end