Sha256: 2faac28de6adea3844098979d6c2bc1a605fd72310154820873973670297c3cd
Contents?: true
Size: 794 Bytes
Versions: 18
Compression:
Stored size: 794 Bytes
Contents
class Code class Parser class Error class SyntaxError < ::Code::Parser::Error def initialize( message, input:, line:, column:, offset_lines:, offset_columns: ) @message = message @input = input @line = line @column = column @offset_lines = offset_lines @offset_columns = offset_columns end def message @message + "\n\n" + line_message + "\n" + " " * column + "^" * offset_columns end private def line_message input.lines[line..(line + offset_lines)].join end attr_reader :input, :line, :column, :offset_lines, :offset_columns end end end end
Version data entries
18 entries across 18 versions & 2 rubygems