Exception: Flexr::LexError
Direct Known Subclasses
Instance Attribute Summary collapse
-
#byte_pos ⇒ Object
readonly
Returns the value of attribute byte_pos.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message, filename: nil, byte_pos: nil, line: nil, text: nil, diagnostic: nil) ⇒ LexError
constructor
A new instance of LexError.
Constructor Details
#initialize(message, filename: nil, byte_pos: nil, line: nil, text: nil, diagnostic: nil) ⇒ LexError
Returns a new instance of LexError.
16 17 18 19 20 21 22 |
# File 'lib/flexr/errors.rb', line 16 def initialize(, filename: nil, byte_pos: nil, line: nil, text: nil, diagnostic: nil) @filename = filename @byte_pos = byte_pos @line = line @text = text super(, diagnostic: diagnostic) end |
Instance Attribute Details
#byte_pos ⇒ Object (readonly)
Returns the value of attribute byte_pos.
14 15 16 |
# File 'lib/flexr/errors.rb', line 14 def byte_pos @byte_pos end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
14 15 16 |
# File 'lib/flexr/errors.rb', line 14 def filename @filename end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
14 15 16 |
# File 'lib/flexr/errors.rb', line 14 def line @line end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
14 15 16 |
# File 'lib/flexr/errors.rb', line 14 def text @text end |