306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
|
# File 'lib/puppet/pops/model/model.rb', line 306
def locator
unless result = getLocator
adapter = Puppet::Pops::Adapters::SourcePosAdapter.adapt(self)
program = eAllContainers.find {|c| c.is_a?(Program) }
source_ref = program.nil? ? '' : program.source_ref
outer_locator = Puppet::Pops::Parser::Locator.locator(adpater., source_ref, line_offsets)
result = Puppet::Pops::Parser::Locator::SubLocator.new(outer_locator,
leading_line_count, offset, leading_line_offset)
setLocator(result)
end
result
end
|