Class: Waxeye::ParseError
- Inherits:
-
Object
- Object
- Waxeye::ParseError
- Defined in:
- lib/waxeye.rb
Instance Attribute Summary collapse
-
#col ⇒ Object
readonly
Returns the value of attribute col.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
Instance Method Summary collapse
- #display ⇒ Object
-
#initialize(pos, line, col) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(pos, line, col) ⇒ ParseError
Returns a new instance of ParseError.
54 55 56 57 58 |
# File 'lib/waxeye.rb', line 54 def initialize(pos, line, col) @pos = pos @line = line @col = col end |
Instance Attribute Details
#col ⇒ Object (readonly)
Returns the value of attribute col.
53 54 55 |
# File 'lib/waxeye.rb', line 53 def col @col end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
53 54 55 |
# File 'lib/waxeye.rb', line 53 def line @line end |
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
53 54 55 |
# File 'lib/waxeye.rb', line 53 def pos @pos end |
Instance Method Details
#display ⇒ Object
60 61 62 |
# File 'lib/waxeye.rb', line 60 def display() print "parse error at pos=#{pos}, line=#{line}, col=#{col}\n" end |