A fork of Crisp for HARP
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

24 righe
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