Class: Squeezy::Reporter
- Inherits:
-
Object
- Object
- Squeezy::Reporter
- Defined in:
- lib/squeezy/reporter.rb
Instance Method Summary collapse
- #do_message(type, message, source_name, line, line_source, line_offset) ⇒ Object
- #error(message, source_name, live, line_source, line_offset) ⇒ Object
- #runtimeError(message, source_name, line, line_source, line_offset) ⇒ Object
- #warning(message, source_name, live, line_source, line_offset) ⇒ Object
Instance Method Details
#do_message(type, message, source_name, line, line_source, line_offset) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/squeezy/reporter.rb', line 7 def (type, , source_name, line, line_source, line_offset) if (line < 0) $stderr.puts("\n[#{type.to_s.upcase}] #{} --> #{line_source}") else $stderr.puts("\n[#{type.to_s.upcase}] #{line} #{line_offset} : #{} --> #{line_source}") end end |
#error(message, source_name, live, line_source, line_offset) ⇒ Object
19 20 21 |
# File 'lib/squeezy/reporter.rb', line 19 def error(, source_name, live, line_source, line_offset) (:error, , source_name, live, line_source, line_offset) end |
#runtimeError(message, source_name, line, line_source, line_offset) ⇒ Object
23 24 25 26 |
# File 'lib/squeezy/reporter.rb', line 23 def runtimeError(, source_name, line, line_source, line_offset) error(, source_name, line, line_source, line_offset) EvaluatorException.new() end |
#warning(message, source_name, live, line_source, line_offset) ⇒ Object
15 16 17 |
# File 'lib/squeezy/reporter.rb', line 15 def warning(, source_name, live, line_source, line_offset) (:warning, , source_name, live, line_source, line_offset) end |