Exception: Emfrp::Typing::TypeDetermineError
- Inherits:
-
CompileError
- Object
- RuntimeError
- CompileError
- Emfrp::Typing::TypeDetermineError
- Defined in:
- lib/emfrp/typing/typing_error.rb
Instance Attribute Summary
Attributes inherited from CompileError
Instance Method Summary collapse
- #code ⇒ Object
-
#initialize(code, undetermined_utype, factor) ⇒ TypeDetermineError
constructor
A new instance of TypeDetermineError.
- #print_error(output_io, file_loader) ⇒ Object
Methods inherited from CompileError
#collect_factor_tags, #factor_name, #find_factor_file_name, #print_lexical_factor, #tag_comp
Constructor Details
#initialize(code, undetermined_utype, factor) ⇒ TypeDetermineError
Returns a new instance of TypeDetermineError.
30 31 32 33 34 |
# File 'lib/emfrp/typing/typing_error.rb', line 30 def initialize(code, undetermined_utype, factor) @code = code @utype = undetermined_utype @factor = factor end |
Instance Method Details
#code ⇒ Object
36 37 38 |
# File 'lib/emfrp/typing/typing_error.rb', line 36 def code @code end |
#print_error(output_io, file_loader) ⇒ Object
40 41 42 43 44 |
# File 'lib/emfrp/typing/typing_error.rb', line 40 def print_error(output_io, file_loader) output_io << "[Undetermined Type Error]".colorize(:red) + ":\n" output_io << "Undetermined: " + "#{@utype.inspect}".colorize(:green) + "\n" print_lexical_factor(@factor, output_io, file_loader) end |