Class: Waxeye::ParseError

Inherits:
Object
  • Object
show all
Defined in:
lib/waxeye.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pos, line, col, nt) ⇒ ParseError

Returns a new instance of ParseError.



54
55
56
57
58
59
# File 'lib/waxeye.rb', line 54

def initialize(pos, line, col, nt)
  @pos = pos
  @line = line
  @col = col
  @nt = nt
end

Instance Attribute Details

#colObject (readonly)

Returns the value of attribute col.



53
54
55
# File 'lib/waxeye.rb', line 53

def col
  @col
end

#lineObject (readonly)

Returns the value of attribute line.



53
54
55
# File 'lib/waxeye.rb', line 53

def line
  @line
end

#ntObject (readonly)

Returns the value of attribute nt.



53
54
55
# File 'lib/waxeye.rb', line 53

def nt
  @nt
end

#posObject (readonly)

Returns the value of attribute pos.



53
54
55
# File 'lib/waxeye.rb', line 53

def pos
  @pos
end

Instance Method Details

#to_sObject



61
62
63
# File 'lib/waxeye.rb', line 61

def to_s()
  "parse error: failed to match '#{nt}' at line=#{line}, col=#{col}, pos=#{pos}\n"
end