Class: Puppet::Pops::Parser::Locator::Locator18
- Inherits:
-
AbstractLocator
- Object
- Puppet::Pops::Parser::Locator
- AbstractLocator
- Puppet::Pops::Parser::Locator::Locator18
- Defined in:
- lib/puppet/pops/parser/locator.rb
Constant Summary
Constants inherited from Puppet::Pops::Parser::Locator
LOCATOR_VERSION, MULTIBYTE, RUBYVER, RUBYVER_ARRAY, RUBY_1_9_3, RUBY_2_0_0
Instance Attribute Summary
Attributes inherited from AbstractLocator
#file, #line_index, #prev_line, #prev_offset, #string
Instance Method Summary collapse
- #char_length(offset, end_offset) ⇒ Object
- #char_offset(char_offset) ⇒ Object
- #offset_on_line(offset) ⇒ Object
Methods inherited from AbstractLocator
#ary_bsearch_i, #compute_line_index, #initialize, #line_for_offset, #pos_on_line, #to_location_hash
Methods inherited from Puppet::Pops::Parser::Locator
#file, #line_for_offset, #line_index, locator, locator_version, #pos_on_line, #string
Constructor Details
This class inherits a constructor from Puppet::Pops::Parser::Locator::AbstractLocator
Instance Method Details
#char_length(offset, end_offset) ⇒ Object
261 262 263 |
# File 'lib/puppet/pops/parser/locator.rb', line 261 def char_length(offset, end_offset) end_offset - offset end |
#char_offset(char_offset) ⇒ Object
257 258 259 |
# File 'lib/puppet/pops/parser/locator.rb', line 257 def char_offset(char_offset) char_offset end |
#offset_on_line(offset) ⇒ Object
252 253 254 255 |
# File 'lib/puppet/pops/parser/locator.rb', line 252 def offset_on_line(offset) line_offset = line_index[ line_for_offset(offset)-1 ] offset - line_offset end |