Support lazy referencing

this PR would make the snowcrash able to recognize references which has been defined after the location of the usage. closes issue #84. this PR is not yet ready to merge.
Oh yeah. Sorry then.

-- 
Pavan Kumar Sunkara

On October 9, 2014 at 12:45:06 PM, alikh31 (notifications@github.com) wrote:
> > + Collection >::iterator requestSMIterator;
> > + Collection >::iterator responseSMIterator;
> > +
> > + bool exportSourceMap = pd.exportSourceMap();
> > +
> > + resourceGroupsSMIterator = out.sourceMap.resourceGroups.collection.begin(); 
> > +
> > + for (ResourceGroups::iterator resourceGroupIterator = out.node.resourceGroups.begin(); 
> > + resourceGroupIterator != out.node.resourceGroups.end();
> > + ++resourceGroupIterator, exportSourceMap ? ++resourceGroupsSMIterator : resourceGroupsSMIterator) 
> {
> > +
> > + if(exportSourceMap) {
> > + resourceSMIterator = resourceGroupsSMIterator->resources.collection.begin(); 
> > + }
> > +
> > + for (Resources::iterator resourceIterator = resourceGroupIterator->resources.begin(); 
> 
> @pksunkara the whole point of all these iterators and traverse is to change some attributes 
> of
> `Payload`, changing this iterator to constant iterator would require to define `payload` 
> as `const payload` which is against the whole logic.
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/apiaryio/snowcrash/pull/223/files#r18637958