Class: RD::RDInlineParser
- Inherits:
-
Object
- Object
- RD::RDInlineParser
- Defined in:
- lib/tdiary/style/rd.rb
Instance Method Summary collapse
Instance Method Details
#on_error(et, ev, values) ⇒ Object
174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/tdiary/style/rd.rb', line 174 def on_error(et, ev, values) lines_of_rest = @src.rest.lines.to_a.length prev_words = prev_words_on_error(ev) at = 4 + prev_words.length = <<-MSG RD syntax error: line #{@blockp.line_index - lines_of_rest - 1}: ...#{prev_words} #{(ev||'')} #{next_words_on_error()} ... MSG << " " * at + "^" * (ev ? ev.length : 0) + "\n" raise ParseError, end |