Class: LibRubyParser::DecodedInput
- Inherits:
-
Object
- Object
- LibRubyParser::DecodedInput
- Defined in:
- lib/lib-ruby-parser.rb
Overview
Input decoded by parser.
If your code has magic encoding comment LibRubyParser re-encodes given input and (potentially) operates on a different byte sequence.
This is why this input should be used to get source of all locations.
Using initial input is wrong as you may get a different source range in a different byte representation.
Instance Attribute Summary collapse
-
#bytes ⇒ String
Re-encoded input string.
-
#lines ⇒ Array<SourceLine>
Array of source lines.
-
#name ⇒ String
Name of the initial input.
Instance Attribute Details
#bytes ⇒ String
Re-encoded input string
191 192 193 |
# File 'lib/lib-ruby-parser.rb', line 191 def bytes @bytes end |
#lines ⇒ Array<SourceLine>
Array of source lines
186 187 188 |
# File 'lib/lib-ruby-parser.rb', line 186 def lines @lines end |
#name ⇒ String
Name of the initial input
181 182 183 |
# File 'lib/lib-ruby-parser.rb', line 181 def name @name end |