Exception: DMark::Parser::ParserError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/d-mark/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line_nr, col_nr, msg) ⇒ ParserError

Returns a new instance of ParserError.



7
8
9
10
11
12
13
# File 'lib/d-mark/parser.rb', line 7

def initialize(line_nr, col_nr, msg)
  @line_nr = line_nr
  @col_nr = col_nr
  @msg = msg

  super("parse error at line #{@line_nr + 1}, col #{@col_nr + 1}: #{@msg}")
end

Instance Attribute Details

#col_nrObject (readonly)

Returns the value of attribute col_nr.



5
6
7
# File 'lib/d-mark/parser.rb', line 5

def col_nr
  @col_nr
end

#line_nrObject (readonly)

Returns the value of attribute line_nr.



4
5
6
# File 'lib/d-mark/parser.rb', line 4

def line_nr
  @line_nr
end