PPI
PPI copied to clipboard
**For the shortest summary, see `Changes` file.** ---- This is a basic implementation of feature-tracking in the parser, with most of the parts that mainly need to be expanded sketched...
---- **Edit:** I have implemented a proof-of-concept, please review and comment: https://github.com/Perl-Critic/PPI/pull/280 ---- ---- ---- This spawned from discussion in #194 and https://github.com/Perl-Critic/Perl-Critic/issues/591 There are a lot of hard problems...
Otherwise, this would be impossible: ``` my $doc = PPI::Document->new(\ "1;\n"); my $token = $doc->last_element; my $new_document = PPI::Document->new(\ '$foo = 1;'); $token->insert_after($_) foreach reverse $new_document->schildren; ```
As requested by @wchristian at https://github.com/Perl-Critic/PPI/pull/247#issuecomment-1187726564