lib/puppet/pops/model/factory.rb
# Records the position (start -> end) and computes the resulting length.
#
Records the position (start -> end) and computes the resulting length.
Records the position ( start - > end ) and computes the resulting length .
def record_position(start_pos, end_pos)
    Puppet::Pops::Adapters::SourcePosAdapter.adapt(current) do |a|
      a.line   = start_pos.line
      a.offset = start_pos.offset
      a.pos    = start_pos.pos
      a.length = start_pos.length
      if(end_pos.offset && end_pos.length)
        a.length = end_pos.offset + end_pos.length - start_pos.offset
      end
    end
    self
  end
def record_position ( start_pos , end_pos ) Puppet :: Pops :: Adapters :: SourcePosAdapter . adapt ( current ) do | a | a . line = start_pos . line a . offset = start_pos . offset a . pos = start_pos . pos a . length = start_pos . length if ( end_pos . offset && end_pos . length ) a . length = end_pos . offset + end_pos . length - start_pos . offset end end self end
Records the position (start -> end) and computes the resulting length.
Records the position ( start - > end ) and computes the resulting length .
start_pos
<not_specific>
end_pos
<not_specific>